Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932211AbbGCNP6 (ORCPT ); Fri, 3 Jul 2015 09:15:58 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:44552 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755216AbbGCNPa (ORCPT ); Fri, 3 Jul 2015 09:15:30 -0400 X-AuditID: cbfee61a-f79516d000006302-b5-55968af0a6f4 From: Jacek Anaszewski To: linux-leds@vger.kernel.org Cc: linux-kernel@vger.kernel.org, cooloney@gmail.com, rpurdie@rpsys.net, stsp@users.sourceforge.net, pavel@ucw.cz, sakari.ailus@linux.intel.com, andreas.werner@men.de, andrew@lunn.ch, ospite@studenti.unina.it, anemo@mba.ocn.ne.jp, ben@simtec.co.uk, bootc@bootc.net, dmurphy@ti.com, daniel.jeong@ti.com, daniel@zonque.org, davem@davemloft.net, fabio.baltieri@gmail.com, balbi@ti.com, florian@openwrt.org, gshark.jeong@gmail.com, g.liakhovetski@gmx.de, ingi2.kim@samsung.com, dl9pf@gmx.de, johan@kernel.org, lenz@cs.wisc.edu, jogo@openwrt.org, q1.kim@samsung.com, kris@krisk.org, kristoffer.ericson@gmail.com, linus.walleij@linaro.org, broonie@kernel.org, michael.hennerich@analog.com, milo.kim@ti.com, nm127@freemail.hu, ncase@xes-inc.com, neilb@suse.de, nick.forbes@incepta.com, lost.distance@yahoo.com, p.meerwald@bct-electronic.com, n0-1@freewrt.org, philippe.retornaz@epfl.ch, raph@8d.com, rpurdie@openedhand.com, rod@whitby.id.au, dave@sr71.net, giometti@linux.it, bigeasy@linutronix.de, shuahkhan@gmail.com, sguinot@lacie.com, kyungmin.park@samsung.com, Jacek Anaszewski Subject: [PATCH/RFC v3 6/7] media: flash: use led_set_brightness_sync for torch brightness Date: Fri, 03 Jul 2015 15:10:51 +0200 Message-id: <1435929052-8736-7-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1435929052-8736-1-git-send-email-j.anaszewski@samsung.com> References: <1435929052-8736-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSf0yMcRzHfZ/n+zz3dJw9O+GRZXbGzI9o2D7MLCO+zPxYDvP78Ijpqt3R CuNEVh2JdJtWSSgXarqk33Q51F3z43aN6BdXrFIJ1RUdl/nv9fl8Xu+9//lwtPwG48MdDj0q akJVIQpWiq3Dn/i5PfEG5fzKipmgL0/E8LLBTMPtpM1Q2XQasq3fMRheX6HhniUQklucLFiK L1NQVthKQ/TvdgxnjI8pSH15DsPVoVQG9NYCBs4OHIS+bhuG7gfpFDyqH6YhqTSegaJ3P1i4 6PiM4H1uDQvRby8w4DLFSiC9WoDa6E4JWKpKGLj6K5sCe0kqCw87cxEMJBSykFhlkkD2YC6G rq4hDK2XKiVQfl2Hob/WTUNnkZWBIX0phgTzJGiosbBgr7VgePAxhYJWWz2C5y+qKXCVN9NQ WtLKQG9BHwV5Tin8dAVAXIIBBywkblMmIu2O5eROYwNFvhuzMHEM5tCkwPiOIlkxd2lyK3ZA Qn72tktIcUqDhPR8203Sbz+hSX5OHEuS6i4wxGhvpsiHujJ244zt0qUHxJDDEaJm3rK90kPO tmYcniyLzL42TocMo+ORFyfwC4Vh603JP54gvGrMY+ORlJPzmUgw1nXgf4MLCRU9espjsby/ 4PrS8Zc5zpufIhTbojwOzXdxQoaxCnmccfxOof9exQhjfrpwzlUz0iDjVwsZpi+MJyvwU4XU K0s9ay+eCGmDsSOK/K9SeCYPJSJZBhqVg8aL4fvDtfuC1f5+WpVaeyw02G9/mDofjTxOm08R MurAjHgOKcbIXlmTlXJGFaGNUpuRwNEKb9nnIINSLjugijouasL2aI6FiFozmsxhxURZddg6 pZwPVh0Vj4hiuKj5f6U4Lx8duoQWBZr8Rk10cB8Ln1780DRng43zXx/VLV/QuzXOtsRgb+lY 68tHO1u2banbvMv1pkmnPlm2LHCxxv1Vb1txwn7//K3ktE0rsxKUZ9c5NlnyZ5elu+cFdac9 rjcERQ6feu/bWDW6/+uzwVX6NTvcU8c6x2amnH7jHfNp9rT7Adv79PkKrD2k8p9Fa7SqP1jv CVI0AwAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1887 Lines: 48 LED subsystem shifted responsibility for choosing between SYNC or ASYNC way of setting brightness from drivers to the caller. Adapt the wrapper to those changes. Signed-off-by: Jacek Anaszewski --- drivers/media/v4l2-core/v4l2-flash-led-class.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-flash-led-class.c b/drivers/media/v4l2-core/v4l2-flash-led-class.c index 4e19dac..b3b082e 100644 --- a/drivers/media/v4l2-core/v4l2-flash-led-class.c +++ b/drivers/media/v4l2-core/v4l2-flash-led-class.c @@ -107,10 +107,10 @@ static void v4l2_flash_set_led_brightness(struct v4l2_flash *v4l2_flash, if (ctrls[LED_MODE]->val != V4L2_FLASH_LED_MODE_TORCH) return; - led_set_brightness(&v4l2_flash->fled_cdev->led_cdev, + led_set_brightness_sync(&v4l2_flash->fled_cdev->led_cdev, brightness); } else { - led_set_brightness(&v4l2_flash->iled_cdev->led_cdev, + led_set_brightness_sync(&v4l2_flash->iled_cdev->led_cdev, brightness); } } @@ -206,11 +206,11 @@ static int v4l2_flash_s_ctrl(struct v4l2_ctrl *c) case V4L2_CID_FLASH_LED_MODE: switch (c->val) { case V4L2_FLASH_LED_MODE_NONE: - led_set_brightness(led_cdev, LED_OFF); + led_set_brightness_sync(led_cdev, LED_OFF); return led_set_flash_strobe(fled_cdev, false); case V4L2_FLASH_LED_MODE_FLASH: /* Turn the torch LED off */ - led_set_brightness(led_cdev, LED_OFF); + led_set_brightness_sync(led_cdev, LED_OFF); if (ctrls[STROBE_SOURCE]) { external_strobe = (ctrls[STROBE_SOURCE]->val == V4L2_FLASH_STROBE_SOURCE_EXTERNAL); -- 1.7.9.5 -- 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/