Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1945993AbbGQJNy (ORCPT ); Fri, 17 Jul 2015 05:13:54 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:35989 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751190AbbGQIsJ (ORCPT ); Fri, 17 Jul 2015 04:48:09 -0400 X-AuditID: cbfee61a-f79516d000006302-99-55a8c1470cda 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, Jacek Anaszewski , Sakari Ailus , Pavel Machek , linux-media@vger.kernel.org Subject: [PATCH/RFC 06/51] media: flash: use led_set_brightness_sync for torch brightness Date: Fri, 17 Jul 2015 10:46:52 +0200 Message-id: <1437122857-6765-7-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1437122857-6765-1-git-send-email-j.anaszewski@samsung.com> References: <1437122857-6765-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCLMWRmVeSWpSXmKPExsVy+t9jAV33gytCDRpnmFsc3TmRyaL36nNG i8u75rBZbH2zjtGiZ8NWVou7p46yWeze9ZTV4tOWb0wWnX3TWBw4PXbOusvuMe9koMee+T9Y Pfq2rGL0WLH6O7tH06l2Vo/Pm+QC2KO4bFJSczLLUov07RK4MpbP9y/o4Kt4Mm0OawPjH+4u Rk4OCQETiX3z1rBC2GISF+6tZ+ti5OIQEljEKHF53j4o5yejxO2TdxhBqtgEDCV+vnjN1MXI wSEiICex80wlSJhZ4C+jRMsyQxBbWCBaYv3NP2BDWQRUJdY+38YOYvMKuEtsad3FAtIqIaAg MWeSDUiYU8BD4v2DlSwgthBQSdufi2wTGHkXMDKsYhRNLUguKE5KzzXUK07MLS7NS9dLzs/d xAgOu2dSOxhXNlgcYhTgYFTi4W1wXREqxJpYVlyZe4hRgoNZSYS3cidQiDclsbIqtSg/vqg0 J7X4EKM0B4uSOO/JfJ9QIYH0xJLU7NTUgtQimCwTB6dUA6PWqVnSE865LVQtl+lUPNhteSj6 7UsfzXvzzVkmsO0MOT4vh8dVIXoz18GKDzHnG3ezL2p6cbQ/79CKmkONDnMs91qUhbyc087K nv7LeLPdbNW7oVfW6zM5VsRrHqi+N3/nvuMnPhVvK2I1u6l0LqBFTsZ0Ef+TZbcOTNwXVHUk OfHg+nzNyXeVWIozEg21mIuKEwGXUnRHNwIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1999 Lines: 51 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 Cc: Sakari Ailus Cc: Pavel Machek Cc: linux-media@vger.kernel.org --- 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 5bdfb8d..5d67335 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/