Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757409AbbGQJ3r (ORCPT ); Fri, 17 Jul 2015 05:29:47 -0400 Received: from mail-bl2on0079.outbound.protection.outlook.com ([65.55.169.79]:6464 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753728AbbGQJ3m (ORCPT ); Fri, 17 Jul 2015 05:29:42 -0400 X-Greylist: delayed 1954 seconds by postgrey-1.27 at vger.kernel.org; Fri, 17 Jul 2015 05:29:41 EDT Authentication-Results: spf=pass (sender IP is 137.71.25.55) smtp.mailfrom=analog.com; vger.kernel.org; dkim=none (message not signed) header.d=none; Message-ID: <55A8C24D.6010002@analog.com> Date: Fri, 17 Jul 2015 10:52:29 +0200 From: Michael Hennerich Reply-To: Organization: Analog Devices Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jacek Anaszewski , CC: , , , , Andrew Lunn Subject: Re: [PATCH/RFC 09/51] leds: adp5520: Remove work queue References: <1437122857-6765-1-git-send-email-j.anaszewski@samsung.com> <1437122857-6765-10-git-send-email-j.anaszewski@samsung.com> In-Reply-To: <1437122857-6765-10-git-send-email-j.anaszewski@samsung.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD015;1:PtbsqON2BB7+YUA61HU+XjkCd9+HM4Dl6SOorSH8S2tyG4FH5/r/JzsQyi/H29OIkrH2q7mlMNMLJLqURKUbEa+GytGE04gLpXnwxgmhmLL6lJHo6G42h39oOL4WybeNkS5lPm+OCEOkUQCGHE5tvt2dZ3hENtFy/hJNOiHbJJ2iy0KJYQPbIPUNFBDllPn93QJye7zUZzahnYcUxA8oW4PdGS/NmRb0X4cBnKlA0bf8h1eMdaRIhNy0scUQjzqiFti9V4ZgqwaDwSv7WBHpiMw3efM0C0RoGyPTUobkJ84DfBu+/jMAuI2DJEHU/6w44w7Yc6hHm7LpTZgAFRsPttbGEmN7vLFyDg4B44xUPImjQNL3vB0S8DsXAXfup6qfKM7QkBxT6+3fWXSXQ+33NyKc/y3A+RP609EnR7fgA8s= X-Forefront-Antispam-Report: CIP:137.71.25.55;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(479174004)(199003)(24454002)(189002)(377454003)(65816999)(4001350100001)(76176999)(54356999)(50986999)(83506001)(23746002)(87266999)(65806001)(65956001)(86362001)(53806999)(87936001)(47776003)(46102003)(59896002)(106466001)(5001770100001)(5001970100001)(77156002)(2950100001)(77096005)(33656002)(43066003)(19580395003)(19580405001)(6806004)(80316001)(189998001)(36756003)(64126003)(50466002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1PR0301MB0738;H:nwd2mta1.analog.com;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1PR0301MB0738;2:dWwzOUADANFckDXWRtKIuKRhLhhe9HpNbDnfQoxQqrtZ0bCaxc/UhzAr0s3C/Ozk;3:U8zS+OcK2WWo3W5BJz1doYhQq1qsuuAyQtzLCc+UlEzPXHRnb8fy9mWd7mW2HS6OYPhytesIRBIKU5bBH/lNc/Vq7YY6lrLTVpJGMKFNcY89JWNBvwln+YPBPUarmSgQCqlEzaAduPswtskwcAyqRYCjpcvh5BYBmmcUxeEj6NFSVh4cqPtV0S9XlUnCfKc1KOtJ6dTlT8rfESmsVo9d+b0sxl6WQNsu4ivsrDuWX/w=;25:Vz6HgTtrZQWFFyxiU17h54b+hmqpWX3Ar5zfUjNk3K/nPI3vfwlqftdLGghRzE53mfOV6OPm263cLafNpFw1aHxxVDbFI7VHPLYFvo257JGZFo4pqlNhgagnuO2qv+HcFRedM9Qw1KCmBGgTwPqFH5HbcyR3KdAP/QyONE0KK5q/NqmJsQ65q4xcxzexYGYlOxlR5TT/Asd7xLi+qU/WRRpIdNNljFwnlCBcwHJaP9wbyLK1T4sDCtSb/C4PbChbSq6ICRTW55nQ9PwLRHfPrA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0738; X-Microsoft-Exchange-Diagnostics: 1;BN1PR0301MB0738;20:bQaaaPA2IsEq9w5PN3SmYe1BVWmuGw/oWTulIMdDLPSjuJ6y+zdVA0gArGzyg/1pqsZp0Bp9GqUR6DRRXTCLRbN9JLWb67jSKUQ1eZOMKQETFEh+bomDPxlOI/THGuq7Dy22eblncF1aOES5mso8PAv6h5izFbb7MPydSI/IFSugkzSEb4f+p3GqRLC1twWh+9PW32X0vN7u/8oUbpxcS6niE7cyKW6y6yHl3/YlVmHC1UxXkS2tnxxEEJ3U0eXfT/NY1BEEXBSUCFzf+KOjjz4cKdaLKE3xSK4gUrhb15eRuZguFAt1ng4GUmBT2EqyGJ31Gtep0j0Zk2dwcurMQaGiRqdO9JRc0gb1kys47gR1RPrJkSB2nnjVD4cnzfw9ugBSNbyEGOQgN+1kTtY5K6UVO9dk8sqC0+2eBjuPQhKEiBRakw6ERi1RGBGABnFvw40Dyx2VPtd+VImRkd4N+bkGBAl7ca0Z4wpQA6o3FGIyr/7N/Fp+tBrdAuU9KsiI;4:n3uMK9h9Md20mxjsxfqvTlPMTeGhGjmXPijKFodWw7zjAGMhJK/TtUV8m83ua0fti3DPL7TTa+k7L7RDNVGinobTmY68xVjEePUYI49g5hFCvnhGqYUy/Bnb/P+CNI60C07HxLBPeGh3a+/PeTGtKR3lx1e0cQx+1Yb08vSgd1K8ZR/O+THIlvmmbOeNvXs5tJuBp84L8TK1gS0PGxi58xhEh20/N9XX+G86HdsvVZOtcI4xTkaH57XbVc8b6cppykVsN3llZBml+6HSngdhC/1gMvNvVsV6BaV7ILCCjhs= BN1PR0301MB0738: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN1PR0301MB0738;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0738; X-Forefront-PRVS: 06400060E1 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BN1PR0301MB0738;23:1RcgNnnGX5GHDfsUWAXS+EtMqASp37Vtpiz?= =?Windows-1252?Q?O7OedAhvqnp5QM+XYputcV+IjXTs2BVsA9VjylWfaNc4XFR9tucaO2/S?= =?Windows-1252?Q?qactomvuw583J1XQJUX8EFp8rcK7Y6uZYr+YjVUCw21snRQx+uIXhZud?= =?Windows-1252?Q?i8NOG5gwa4Y884izor6okA4c8eV8OuGisgu42e1V0XUVC2TKYLLCiKhi?= =?Windows-1252?Q?jFrEjLgcTmac/vL1s2itAlK3MoF7+wnifZNqDIszI+sUGx/sy5LMqmpP?= =?Windows-1252?Q?pBZIc35r7oNDVBtAm/AE2VMmVyJHgJZWIH0tldJ6uzYdfGdMSDqjevNd?= =?Windows-1252?Q?y4CKWlz7h7EGe9shIeIG4t/CEsvhHtTnBj6CPmiF1bQ4y42mTCZtHFj6?= =?Windows-1252?Q?tcs1WrwJKyzvl3duuaHcUmr2RA+dsBkneP/9aE9dejV2DYLAQVCOZwEX?= =?Windows-1252?Q?UAxNxTucFLIkycvblOeI6WxJFe8NDOKZs5aJST0cpJ+/9kQ3egp4f/eP?= =?Windows-1252?Q?wnssLst1tENWIt9ycbCPiADEkbxwsBzTO3RybHNIGcjcnKSA8u9HANNB?= =?Windows-1252?Q?VEdbrVMmpUsQwXxUpEIWF0p3pHb993WAaiMeWPL9bMsu3wapRqRWwiyq?= =?Windows-1252?Q?EuWm9JRWZYnrZLghYIcrKzmk8+2IbkdMcx4Xy6kzqQ9iuhoNrn1w1UvX?= =?Windows-1252?Q?kIjt9evUK7t/5YRMpd2zLwjmS0tCM+8BiAtA5F7Te3poosb2Rs6AYXC/?= =?Windows-1252?Q?x+ee83EwaZuUZAJO2PGGcSgp0HMMFd/FC80b8m7VeufFua4Nkve6Dd2+?= =?Windows-1252?Q?8JJK2+ZM3ilaj5aL+JA/TyRmmlISFOeZe/V3VY3U8EBCp5hTfA6SPqd5?= =?Windows-1252?Q?TovTWEzVSZhe1EZLzL/e5EFN/i7/ZBHO2AJ4+oL6MJ2/GTR9jdQB6w3e?= =?Windows-1252?Q?9Wdz3NYQTZohBiT9qXhmTRBv38seFkzcexdY2XGyNnrme1fo8O4rDpMh?= =?Windows-1252?Q?s9LSkwC/hMrAIeeDvkY/fGeTCxRtA1eDvIEw7rvC+IOR7Pn2nYHeDh5j?= =?Windows-1252?Q?nbmGFo7XmoJreND4bDnrGIuMxdZ0exs4FKbJpklrQeygeESzILBvGK1J?= =?Windows-1252?Q?oPdhjr7WP46dIJHQWktn7E6g=3D?= X-Microsoft-Exchange-Diagnostics: 1;BN1PR0301MB0738;5:foPh4svC7bzzoLCuM4rUsv9nYNgpvsrLH3F3vbLCaMr6lSDqXibVanB//3VyaW3Ynn0pU2FDdOvy3z/LkgGpmXASQ0ZC0MWbiF/zpEruftBoc/DI4Gm8ifE+kyChO9my7s8xX4kGUnZMh7euqwp4Ug==;24:srWpJStGf10GZ3qJ7iNn/Be+4qlT8YPvU8Y+P16Uv7nEahMV0aNElRrFURbTjjpf70XhJFBLXfoj6yq4vZeDk/dBX8X6/wYHheshUgCVUs0=;20:pixhzk4K1oGQKpDUlrh5r6gnzXzdewqy9SCM1NJjVd+663i18OMu5w+wLoaB0+mDfCfIbP6i8jzHDBndXTmtVw== X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2015 08:57:04.9191 (UTC) X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a;Ip=[137.71.25.55];Helo=[nwd2mta1.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0738 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3127 Lines: 102 On 07/17/2015 10:46 AM, Jacek Anaszewski wrote: > From: Andrew Lunn > > Now the core implements the work queue, remove it from the driver. > > Signed-off-by: Andrew Lunn Acked-by: Michael Hennerich > Cc: Michael Hennerich > --- > drivers/leds/leds-adp5520.c | 22 +++------------------- > 1 file changed, 3 insertions(+), 19 deletions(-) > > diff --git a/drivers/leds/leds-adp5520.c b/drivers/leds/leds-adp5520.c > index 07e66ca..6378150 100644 > --- a/drivers/leds/leds-adp5520.c > +++ b/drivers/leds/leds-adp5520.c > @@ -17,34 +17,24 @@ > #include > #include > #include > -#include > #include > #include > > struct adp5520_led { > struct led_classdev cdev; > - struct work_struct work; > struct device *master; > - enum led_brightness new_brightness; > int id; > int flags; > }; > > -static void adp5520_led_work(struct work_struct *work) > -{ > - struct adp5520_led *led = container_of(work, struct adp5520_led, work); > - adp5520_write(led->master, ADP5520_LED1_CURRENT + led->id - 1, > - led->new_brightness >> 2); > -} > - > static void adp5520_led_set(struct led_classdev *led_cdev, > enum led_brightness value) > { > struct adp5520_led *led; > > led = container_of(led_cdev, struct adp5520_led, cdev); > - led->new_brightness = value; > - schedule_work(&led->work); > + adp5520_write(led->master, ADP5520_LED1_CURRENT + led->id - 1, > + value >> 2); > } > > static int adp5520_led_setup(struct adp5520_led *led) > @@ -146,9 +136,6 @@ static int adp5520_led_probe(struct platform_device *pdev) > led_dat->id = led_dat->flags & ADP5520_FLAG_LED_MASK; > > led_dat->master = pdev->dev.parent; > - led_dat->new_brightness = LED_OFF; > - > - INIT_WORK(&led_dat->work, adp5520_led_work); > > ret = led_classdev_register(led_dat->master, &led_dat->cdev); > if (ret) { > @@ -170,10 +157,8 @@ static int adp5520_led_probe(struct platform_device *pdev) > > err: > if (i > 0) { > - for (i = i - 1; i >= 0; i--) { > + for (i = i - 1; i >= 0; i--) > led_classdev_unregister(&led[i].cdev); > - cancel_work_sync(&led[i].work); > - } > } > > return ret; > @@ -192,7 +177,6 @@ static int adp5520_led_remove(struct platform_device *pdev) > > for (i = 0; i < pdata->num_leds; i++) { > led_classdev_unregister(&led[i].cdev); > - cancel_work_sync(&led[i].work); > } > > return 0; -- Greetings, Michael -- Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368; Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/