Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932308AbcCHI01 (ORCPT ); Tue, 8 Mar 2016 03:26:27 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:39071 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753489AbcCHI0S (ORCPT ); Tue, 8 Mar 2016 03:26:18 -0500 X-AuditID: cbfec7f5-f79b16d000005389-db-56de8ca3f8fd Message-id: <56DE8C9E.1000400@samsung.com> Date: Tue, 08 Mar 2016 09:26:06 +0100 From: Jacek Anaszewski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-version: 1.0 To: Amitoj Kaur Chawla Cc: rpurdie@rpsys.net, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, julia.lawall@lip6.fr Subject: Re: [PATCH 0/7] leds: Use devm_led_classdev_register References: In-reply-to: Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJLMWRmVeSWpSXmKPExsVy+t/xK7qLe+6FGUzYz2bx6NciNotlD04z WlzeNYfNYuubdYwWu3c9ZXVg9dg56y67x94tWR575v9g9fi8SS6AJYrLJiU1J7MstUjfLoEr o21vI3PBPf6Kj4fVGxg38nQxcnJICJhInLx+hwXCFpO4cG89WxcjF4eQwFJGiT/texghnGeM ErO+zQVyODh4BbQk1reUgjSwCKhK9O9dBNbMJmAo8fPFayYQW1QgQuLP6X2sIDavgKDEj8n3 wGpEBHQlDj24DBZnFkiXmLangw3EFhawlZi4Yj9YjZCAucTEl1/BVnEKWEg8bKuHKLeWWDlp GyOELS+xec1b5gmMArOQbJiFpGwWkrIFjMyrGEVTS5MLipPSc430ihNzi0vz0vWS83M3MUIC +OsOxqXHrA4xCnAwKvHwdny/GybEmlhWXJl7iFGCg1lJhJe/5V6YEG9KYmVValF+fFFpTmrx IUZpDhYlcd6Zu96HCAmkJ5akZqemFqQWwWSZODilGhhFwhSFKpfzy+ter63f+yidYeuM3Idn RC1V36uszPdfr+P1fGGqoJdG9M4PL5RYCjPDHzFxpZT8ZmZv+z/V1iXqyq7I4wFVDM+EzSKS +AJOGh3Z/qOWqcVq7ZKL7QsmSNzbNfmfOcOnguYpxq2fZzffb5m4dAKD/a6wlWrzz+4ynl2X oLxDeb8SS3FGoqEWc1FxIgCiyV4uXAIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1942 Lines: 70 Hi Amitoj, Thanks for the patches. Applied only the 7/7 one. In the remaining ones, please remove also all occurrences of platform_set_drvdata() in the probe() and pdev_to_gpio() definition from leds-s3c24xx.cm as they will be no longer required. Best regards, Jacek Anaszewski On 03/07/2016 03:50 PM, Amitoj Kaur Chawla wrote: > Switch to resource-managed function devm_led_classdev_register instead > of led_classdev_register and remove unneeded led_classdev_unregister. > > The Coccinelle semantic patch used to make this change is as follows: > // > @platform@ > identifier p, probefn, removefn; > @@ > struct platform_driver p = { > .probe = probefn, > .remove = removefn, > }; > > @prb@ > identifier platform.probefn, pdev; > expression e; > @@ > probefn(struct platform_device *pdev, ...) { > ... > e = > - led_classdev_register > + devm_led_classdev_register > (...); > ... > ?- led_classdev_unregister(...); > ... > } > @remove depends on prb@ > identifier platform.removefn; > @@ > removefn(...) { > ... > ?- led_classdev_unregister(...); > ... > } > // > > Amitoj Kaur Chawla (7): > leds: 88pm860x: Use devm_led_classdev_register > leds: lp8788: Use devm_led_classdev_register > leds: wm381x-status: Use devm_led_classdev_register > leds: s3c24xx: Use devm_led_classdev_register > leds: da903x: Use devm_led_classdev_register > leds: max8997: Use devm_led_classdev_register > leds: lm3533: Use devm_led_classdev_register > > drivers/leds/leds-88pm860x.c | 11 +---------- > drivers/leds/leds-da903x.c | 11 +---------- > drivers/leds/leds-lm3533.c | 12 +++--------- > drivers/leds/leds-lp8788.c | 12 +----------- > drivers/leds/leds-max8997.c | 12 +----------- > drivers/leds/leds-s3c24xx.c | 12 +----------- > drivers/leds/leds-wm831x-status.c | 12 +----------- > 7 files changed, 9 insertions(+), 73 deletions(-) >