static DECLARE_WAIT_QUEUE_HEAD(hp_sdc_rtc_wait);
-static ssize_t hp_sdc_rtc_read(struct file *file, char *buf,
+static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos);
static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file,
return 0;
}
-static ssize_t hp_sdc_rtc_read(struct file *file, char *buf,
+static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) {
ssize_t retval;
if (count < sizeof(unsigned long))
return -EINVAL;
- retval = put_user(68, (unsigned long *)buf);
+ retval = put_user(68, (unsigned long __user *)buf);
return retval;
}
if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr)))
return ret;
misc_register(&hp_sdc_rtc_dev);
- create_proc_read_entry ("driver/rtc", 0, 0,
+ create_proc_read_entry ("driver/rtc", 0, NULL,
hp_sdc_rtc_read_proc, NULL);
printk(KERN_INFO "HP i8042 SDC + MSM-58321 RTC support loaded "
}
#define FUNC(funct, funct_arg, zero_rc, neg_rc, pos_rc) \
-{ HILSE_FUNC, { func: &funct }, funct_arg, zero_rc, neg_rc, pos_rc },
+{ HILSE_FUNC, { .func = funct }, funct_arg, zero_rc, neg_rc, pos_rc },
#define OUT(pack) \
-{ HILSE_OUT, { packet: pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 },
+{ HILSE_OUT, { .packet = pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 },
#define CTS \
-{ HILSE_CTS, { packet: 0 }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 },
+{ HILSE_CTS, { .packet = 0 }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 },
#define EXPECT(comp, to, got, got_wrong, timed_out) \
-{ HILSE_EXPECT, { packet: comp }, to, got, got_wrong, timed_out },
+{ HILSE_EXPECT, { .packet = comp }, to, got, got_wrong, timed_out },
#define EXPECT_LAST(comp, to, got, got_wrong, timed_out) \
-{ HILSE_EXPECT_LAST, { packet: comp }, to, got, got_wrong, timed_out },
+{ HILSE_EXPECT_LAST, { .packet = comp }, to, got, got_wrong, timed_out },
#define EXPECT_DISC(comp, to, got, got_wrong, timed_out) \
-{ HILSE_EXPECT_DISC, { packet: comp }, to, got, got_wrong, timed_out },
+{ HILSE_EXPECT_DISC, { .packet = comp }, to, got, got_wrong, timed_out },
#define IN(to, got, got_error, timed_out) \
-{ HILSE_IN, { packet: 0 }, to, got, got_error, timed_out },
+{ HILSE_IN, { .packet = 0 }, to, got, got_error, timed_out },
#define OUT_DISC(pack) \
-{ HILSE_OUT_DISC, { packet: pack }, 0, 0, 0, 0 },
+{ HILSE_OUT_DISC, { .packet = pack }, 0, 0, 0, 0 },
#define OUT_LAST(pack) \
-{ HILSE_OUT_LAST, { packet: pack }, 0, 0, 0, 0 },
+{ HILSE_OUT_LAST, { .packet = pack }, 0, 0, 0, 0 },
struct hilse_node hil_mlc_se[HILSEN_END] = {