From b154d78e5dcd30b9515001d5b135d1d5cee0b222 Mon Sep 17 00:00:00 2001 From: Anirudh Ghayal Date: Tue, 8 Nov 2016 16:46:35 +0530 Subject: [PATCH] leds: qpnp-flash: Fix the mask in the flash prepare API Use the correct LED_OPTIONS mask to enable all the supported flash prepare APIs. CRs-Fixed: 1090029 Change-Id: I66f6de42b106fa2027285e7393b6f9fc143d00d8 Signed-off-by: Anirudh Ghayal --- drivers/leds/leds-qpnp-flash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/leds/leds-qpnp-flash.c b/drivers/leds/leds-qpnp-flash.c index 95b4c42a5adb..98dfa56add51 100644 --- a/drivers/leds/leds-qpnp-flash.c +++ b/drivers/leds/leds-qpnp-flash.c @@ -82,7 +82,6 @@ #define FLASH_LED_HDRM_SNS_ENABLE_MASK 0x81 #define FLASH_MASK_MODULE_CONTRL_MASK 0xE0 #define FLASH_FOLLOW_OTST2_RB_MASK 0x08 -#define FLASH_PREPARE_OPTIONS_MASK 0x08 #define FLASH_LED_TRIGGER_DEFAULT "none" #define FLASH_LED_HEADROOM_DEFAULT_MV 500 @@ -1172,7 +1171,7 @@ int qpnp_flash_led_prepare(struct led_trigger *trig, int options, flash_node = container_of(led_cdev, struct flash_node_data, cdev); led = dev_get_drvdata(&flash_node->pdev->dev); - if (!(options & FLASH_PREPARE_OPTIONS_MASK)) { + if (!(options & FLASH_LED_PREPARE_OPTIONS_MASK)) { dev_err(&led->pdev->dev, "Invalid options %d\n", options); return -EINVAL; }