diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 56e8198e13d1..2b40b42c9722 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -772,6 +772,12 @@ config LEDS_IS31FL32XX LED controllers. They are I2C devices with multiple constant-current channels, each with independent 256-level PWM control. +config LEDS_RGB13H + tristate "LED support for DL3020RGB13H flash LED controller" + depends on LEDS_CLASS_FLASH && GPIOLIB && OF + help + Say Y here to include support for DL3020RGB13H LED controllers. + config LEDS_SC27XX_BLTC tristate "LED support for the SC27xx breathing light controller" depends on LEDS_CLASS && MFD_SC27XX_PMIC diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile index 73e603e1727e..66239056bc93 100644 --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile @@ -37,6 +37,7 @@ obj-$(CONFIG_LEDS_IP30) += leds-ip30.o obj-$(CONFIG_LEDS_IPAQ_MICRO) += leds-ipaq-micro.o obj-$(CONFIG_LEDS_IS31FL319X) += leds-is31fl319x.o obj-$(CONFIG_LEDS_IS31FL32XX) += leds-is31fl32xx.o +obj-$(CONFIG_LEDS_RGB13H) += leds-rgb13h.o obj-$(CONFIG_LEDS_KTD2692) += leds-ktd2692.o obj-$(CONFIG_LEDS_LM3530) += leds-lm3530.o obj-$(CONFIG_LEDS_LM3532) += leds-lm3532.o diff --git a/drivers/leds/leds-rgb13h.c b/drivers/leds/leds-rgb13h.c index 91af1733996e..929152d535ec 100644 --- a/drivers/leds/leds-rgb13h.c +++ b/drivers/leds/leds-rgb13h.c @@ -20,6 +20,7 @@ #include #include #include +#include #define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x1) @@ -48,7 +49,7 @@ struct rgb13h_led { /* assures led-triggers compatibility */ struct work_struct work_brightness_set; - struct timeval timestamp; + struct __kernel_old_timeval timestamp; u32 timeout; bool waiting; @@ -102,7 +103,7 @@ static int rgb13h_set_output(struct rgb13h_led *led, bool on) wake_up(&led->done); } } else { - led->timestamp = ns_to_timeval(ktime_get_ns()); + led->timestamp = ns_to_kernel_old_timeval(ktime_get_ns()); } mutex_unlock(&led->lock); return 0; @@ -448,10 +449,10 @@ static long rgb13h_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { struct rgb13h_led *led = sd_to_led(sd); - struct timeval *t; + struct __kernel_old_timeval *t; if (cmd == RK_VIDIOC_FLASH_TIMEINFO) { - t = (struct timeval *)arg; + t = (struct __kernel_old_timeval *)arg; t->tv_sec = led->timestamp.tv_sec; t->tv_usec = led->timestamp.tv_usec; } else { @@ -462,14 +463,14 @@ static long rgb13h_ioctl(struct v4l2_subdev *sd, #ifdef CONFIG_COMPAT #define RK_VIDIOC_COMPAT_FLASH_TIMEINFO \ - _IOR('V', BASE_VIDIOC_PRIVATE + 0, struct compat_timeval) + _IOR('V', BASE_VIDIOC_PRIVATE + 0, struct old_timeval32) static long rgb13h_compat_ioctl32(struct v4l2_subdev *sd, unsigned int cmd, unsigned long arg) { - struct timeval t; - struct compat_timeval compat_t; - struct compat_timeval __user *p32 = compat_ptr(arg); + struct __kernel_old_timeval t; + struct old_timeval32 compat_t; + struct old_timeval32 __user *p32 = compat_ptr(arg); if (cmd == RK_VIDIOC_COMPAT_FLASH_TIMEINFO) { rgb13h_ioctl(sd, RK_VIDIOC_FLASH_TIMEINFO, &t);