Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932957AbcCIPXu (ORCPT ); Wed, 9 Mar 2016 10:23:50 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:53841 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751316AbcCIPXl (ORCPT ); Wed, 9 Mar 2016 10:23:41 -0500 X-AuditID: cbfec7f5-f79b16d000005389-f4-56e03ff81425 Message-id: <56E03FF7.5010604@samsung.com> Date: Wed, 09 Mar 2016 16:23:35 +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 v2 0/6] 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+NgFjrNLMWRmVeSWpSXmKPExsVy+t/xy7o/7B+EGfxbL2zx6NciNotlD04z WlzeNYfNYuubdYwWu3c9ZXVg9dg56y67x94tWR575v9g9fi8SS6AJYrLJiU1J7MstUjfLoEr 48ayLWwFDfwVEy8+ZGxgfMDdxcjJISFgInFu1312CFtM4sK99WxdjFwcQgJLGSV2NV1gBkkI CTxjlDiyWgHE5hXQkni49A8TiM0ioCqxf/NHMJtNwFDi54vXYLaoQITEn9P7WCHqBSV+TL7H AmKLCOhKHHpwGSzOLJAuMW1PBxuILSzgIHHjw3oWiF3mEk/mrwCLcwpYSMy538MMUW8tsXLS NkYIW15i85q3zBMYBWYhWTELSdksJGULGJlXMYqmliYXFCel5xrpFSfmFpfmpesl5+duYoQE 8dcdjEuPWR1iFOBgVOLhjXC5HybEmlhWXJl7iFGCg1lJhNcSGANCvCmJlVWpRfnxRaU5qcWH GKU5WJTEeWfueh8iJJCeWJKanZpakFoEk2Xi4JRqYNSMmb7Tp272Q30bhuTHtnnyU40m2JR3 zz3e1FOVcPXO+TV73p8rY5Hsz9J/crwmKL8rJHb7DJ+XairO01njJk5MypSfkpYa2Bm6ptCH N1Ontur8weMf1GaKvv5uw1WUkPVY9e3Zz4dre7/9ucRlxWn08+iWtwemlX+wuzfzp+DdN12V bj87biuxFGckGmoxFxUnAgBtztVFXgIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1853 Lines: 67 Hi Amitoj, On 03/09/2016 04:23 AM, 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 (6): > leds: 88pm860x: Use devm_led_classdev_register > leds: lp8788: Use devm_led_classdev_register > leds: wm831x-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 > > Changes in v2: > -Patches 1-6: Remove unnecessary platform_set_drvdata > -Patch 4: Remove unnecessary pdev_to_gpio function definition > > drivers/leds/leds-88pm860x.c | 12 +----------- > drivers/leds/leds-da903x.c | 12 +----------- > drivers/leds/leds-lp8788.c | 14 +------------- > drivers/leds/leds-max8997.c | 14 +------------- > drivers/leds/leds-s3c24xx.c | 19 +------------------ > drivers/leds/leds-wm831x-status.c | 13 +------------ > 6 files changed, 6 insertions(+), 78 deletions(-) > Thanks for the updated set. All patches have been applied to the linux-leds.git. -- Best regards, Jacek Anaszewski