hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/leds/leds-rgb13h.c
....@@ -20,6 +20,7 @@
2020 #include <linux/workqueue.h>
2121 #include <linux/version.h>
2222 #include <linux/pwm.h>
23
+#include <linux/compat.h>
2324
2425 #define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x1)
2526
....@@ -48,7 +49,7 @@
4849 /* assures led-triggers compatibility */
4950 struct work_struct work_brightness_set;
5051
51
- struct timeval timestamp;
52
+ struct __kernel_old_timeval timestamp;
5253
5354 u32 timeout;
5455 bool waiting;
....@@ -102,7 +103,7 @@
102103 wake_up(&led->done);
103104 }
104105 } else {
105
- led->timestamp = ns_to_timeval(ktime_get_ns());
106
+ led->timestamp = ns_to_kernel_old_timeval(ktime_get_ns());
106107 }
107108 mutex_unlock(&led->lock);
108109 return 0;
....@@ -448,10 +449,10 @@
448449 unsigned int cmd, void *arg)
449450 {
450451 struct rgb13h_led *led = sd_to_led(sd);
451
- struct timeval *t;
452
+ struct __kernel_old_timeval *t;
452453
453454 if (cmd == RK_VIDIOC_FLASH_TIMEINFO) {
454
- t = (struct timeval *)arg;
455
+ t = (struct __kernel_old_timeval *)arg;
455456 t->tv_sec = led->timestamp.tv_sec;
456457 t->tv_usec = led->timestamp.tv_usec;
457458 } else {
....@@ -462,14 +463,14 @@
462463
463464 #ifdef CONFIG_COMPAT
464465 #define RK_VIDIOC_COMPAT_FLASH_TIMEINFO \
465
- _IOR('V', BASE_VIDIOC_PRIVATE + 0, struct compat_timeval)
466
+ _IOR('V', BASE_VIDIOC_PRIVATE + 0, struct old_timeval32)
466467 static long rgb13h_compat_ioctl32(struct v4l2_subdev *sd,
467468 unsigned int cmd,
468469 unsigned long arg)
469470 {
470
- struct timeval t;
471
- struct compat_timeval compat_t;
472
- struct compat_timeval __user *p32 = compat_ptr(arg);
471
+ struct __kernel_old_timeval t;
472
+ struct old_timeval32 compat_t;
473
+ struct old_timeval32 __user *p32 = compat_ptr(arg);
473474
474475 if (cmd == RK_VIDIOC_COMPAT_FLASH_TIMEINFO) {
475476 rgb13h_ioctl(sd, RK_VIDIOC_FLASH_TIMEINFO, &t);