From patchwork Wed May 4 06:02:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9010501 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 74B38BF29F for ; Wed, 4 May 2016 06:08:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A6D3202EC for ; Wed, 4 May 2016 06:08:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C3B992027D for ; Wed, 4 May 2016 06:08:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757195AbcEDGDM (ORCPT ); Wed, 4 May 2016 02:03:12 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:35172 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757187AbcEDGDL (ORCPT ); Wed, 4 May 2016 02:03:11 -0400 Received: by mail-pa0-f43.google.com with SMTP id iv1so20104331pac.2; Tue, 03 May 2016 23:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kJB8MCvMAG2qibLLxQZgesW8F3XpjwfJcmY6z+mI+uQ=; b=mdLxSsEUJ/1VwRvZVZ3OZxX+c7/X08NY8jTOfJgoggOz1+0uA8Vbw8YpdXYRYCEEqf 1UVDqNv25/2D3bIFmkZF6Pr11t4a0mJl99/VjFop1PKEfXBy16BqtSWs0LUYDPadxh1s vVNeFh31n6TnbTkD9R1rC8jHRzviXKNWYpiqKKEzQnQauarxtqv47+tftkUb59TvVEfk DC1h1PUAHvsWebZMixrIiizf0oK6Ji7jyapw5cGoqgYJg/Gk1vQQCRZoV/c1CZogJM+W ts0PPIv8DtSIRjgdolMgWabA6RlHARtv5FB126qHHLu5i2RfI9sw58BDS/C8xbDOVyat 5aiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kJB8MCvMAG2qibLLxQZgesW8F3XpjwfJcmY6z+mI+uQ=; b=KoX2UoLEm5RKk2QVAcJvDGMFe1KAZyspQG1pfaIIoRk5poWnDs4dkssueDksQFgIM3 2dWNvwKowd4KF0G3f5nJM9sa9qvnGMVGl8MO49HV5f5eJ1Nengi3JzElUj/HFgjCxdni NtgxFZ9ypsPIfSx75lMZ/nu+JIb5SJfahRkwiJLrRWNXqrM+0DXdRCxX9oZBE8kxsMAD 5EAXtJHfUqW9fIp8UyH6bQwo2dC1CYtrEHVuQi1XuZ7PXb9QgfN65/Iy2PFjQzdAnsHM FbnFGCxVjhfqqupXHibSNd7Yc56deepX9mQUm0sF/vBUpNefqs+P2JTDbiWSqPVdtIsL A/5A== X-Gm-Message-State: AOPr4FU0xKsxwJrURKnNzgPW7aE5OqONwIt5vS5vEaZd0B363zhlSM+NsOKfej1wcPBxKA== X-Received: by 10.66.90.196 with SMTP id by4mr9641909pab.117.1462341790434; Tue, 03 May 2016 23:03:10 -0700 (PDT) Received: from localhost ([2601:647:4203:c8e0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id n10sm2642138pax.18.2016.05.03.23.03.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 May 2016 23:03:09 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Eduardo Valentin Subject: [PATCH 12/31] thermal: core: remove unnecessary device_remove() calls Date: Tue, 3 May 2016 23:02:26 -0700 Message-Id: <1462341765-13268-13-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1462341765-13268-1-git-send-email-edubezval@gmail.com> References: <1462341765-13268-1-git-send-email-edubezval@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Given that cdevs sysfs properties are already registered using the dev.groups, there is no need to explicitly call device_remove() for each property. Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index e844a04..5c13fa8 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1798,11 +1798,6 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev) mutex_unlock(&thermal_list_lock); - if (cdev->type[0]) - device_remove_file(&cdev->device, &dev_attr_cdev_type); - device_remove_file(&cdev->device, &dev_attr_max_state); - device_remove_file(&cdev->device, &dev_attr_cur_state); - release_idr(&thermal_cdev_idr, &thermal_idr_lock, cdev->id); device_unregister(&cdev->device); return;