You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
leds: leds-rgb13h: fix compile error
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com> Change-Id: Iafd7db5aa53ea70d9a6aa45f8270a3d3fd43bf4e
This commit is contained in:
committed by
Tao Huang
parent
828f51750a
commit
319eea00ad
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/pwm.h>
|
||||
#include <linux/compat.h>
|
||||
|
||||
#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);
|
||||
|
||||
Reference in New Issue
Block a user