From patchwork Tue Nov 8 05:08:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9416695 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A464C60459 for ; Tue, 8 Nov 2016 06:18:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9336F28C12 for ; Tue, 8 Nov 2016 06:18:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 851E228C1B; Tue, 8 Nov 2016 06:18:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24C0C28C12 for ; Tue, 8 Nov 2016 06:18:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750938AbcKHGSh (ORCPT ); Tue, 8 Nov 2016 01:18:37 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33406 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750724AbcKHGSh (ORCPT ); Tue, 8 Nov 2016 01:18:37 -0500 Received: by mail-pf0-f194.google.com with SMTP id 144so9867696pfv.0; Mon, 07 Nov 2016 22:18:36 -0800 (PST) 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=dw905IPL4k02WCwsVmXjCAj5zk1nNmWNGsfxx5bfue8=; b=C+bpIwdR/y1rcZGhYP3DXV3lHG3P0W/H6CBocd9pc82TmZhGfVhRpfJmAcCaftKWBf /q6DYEk1ln0h41WiqdHpA42jMYIbAhwdqx0JfLjGl5Ebezvts9TY1EmfhSNXzDlHHoln jkBlfKDzYASACZNL4OtjnMuhvmyFYRovPlBTmAurOhEGY1cFIh2CwYodhIQxymYBVz43 FiD8fCxFBz9BjhoYuuV5aOhoXhPjIDzhQNVrONEqEqiRpIRxcEfXqq4O7WX1oqnHgsse tXr4zCwz0ofAAVSb3tqYI9oeWvUcSKBHRFQO2yTrWA/x6cC1HX+LGNLTkpwTQnMQJUzd tYSg== 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=dw905IPL4k02WCwsVmXjCAj5zk1nNmWNGsfxx5bfue8=; b=Lf894n3yPgRSwTSnyQiw1s1jD7rpKJgHLDOYuvNeJWQGAN+ma7i/nl3+r0pDzrlYr0 xJ8rQgSey/5rWiy2WesTK9ZfJSUNhzipNY5Lvy+KdgE39JNi7M5ZEyUO/Eg0V48YjyPb X4G/lblciSSAtkSlhOGA+xnbwqi9J4cDyXM2BFwXMNfWBIDwGuGC0M21HmAxPDt2yCtD fwswoAWUFhueknIVtQYcvPz1VDoj02IYY+qSf++ugYzHOKWQ4X6rly+vImYae7qsMXhx v6BnEALT+cWrdqJQD0pLgXk0V/3+hYCQcRYY6nm3Q7PjrMxZKCmPaRvo06Ev5gyK9i8d wgNw== X-Gm-Message-State: ABUngvdPhFHpvdumCQ4D6kqqOZuA5IecUz+3Ueyl9CpsbtQn9JEPNErNl4AfvH4DJQd3kA== X-Received: by 10.98.223.203 with SMTP id d72mr20228552pfl.2.1478581820925; Mon, 07 Nov 2016 21:10:20 -0800 (PST) Received: from localhost ([2601:647:4401:a2f0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id sh9sm44512614pac.41.2016.11.07.21.10.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 21:10:20 -0800 (PST) From: Eduardo Valentin To: Rui Zhang Cc: LKML , Linux PM , Eduardo Valentin Subject: [PATCHv2 15/49] thermal: core: remove unnecessary device_remove() calls Date: Mon, 7 Nov 2016 21:08:53 -0800 Message-Id: <1478581767-7009-16-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1478581767-7009-1-git-send-email-edubezval@gmail.com> References: <1478581767-7009-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-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 b1d6de9..6100ae7 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1876,11 +1876,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;