move rtc compat ioctl handling to fs/compat_ioctl.c
Subsystems (3)
PATCH 1/3 move rtc compat ioctl handling to fs/compat_ioctl.c
This patch implements generic handling of RTC_IRQP_READ32, RTC_IRQP_SET32, RTC_EPOCH_READ32 and RTC_EPOCH_SET32 in fs/compat_ioctl.c. It's based on the x86_64 code which needed a little massaging to be endian-clean.
parisc used COMPAT_IOCTL or generic w_long handlers for these whichce is wrong and can't work because the ioctls encode sizeof(unsigned long) in their ioctl number. parisc also duplicated COMPAT_IOCTL entries for other rtc ioctls which I remove in this patch, too.
arch/parisc/kernel/ioctl32.c +0 -19
@@ -36,25 +36,6 @@ HANDLE_IOCTL(SIOCGPPPCSTATS, dev_ifsioc) HANDLE_IOCTL(SIOCGPPPVER, dev_ifsioc) -#if defined(CONFIG_GEN_RTC ) -COMPATIBLE_IOCTL (RTC_AIE_ON) -COMPATIBLE_IOCTL (RTC_AIE_OFF ) -COMPATIBLE_IOCTL (RTC_UIE_ON ) -COMPATIBLE_IOCTL (RTC_UIE_OFF ) -COMPATIBLE_IOCTL (RTC_PIE_ON ) -COMPATIBLE_IOCTL (RTC_PIE_OFF ) -COMPATIBLE_IOCTL (RTC_WIE_ON ) -COMPATIBLE_IOCTL (RTC_WIE_OFF ) -COMPATIBLE_IOCTL (RTC_ALM_SET )/* struct rtc_time only has ints */ -COMPATIBLE_IOCTL (RTC_ALM_READ )/* struct rtc_time only has ints */ -COMPATIBLE_IOCTL (RTC_RD_TIME )/* struct rtc_time only has ints */ -COMPATIBLE_IOCTL (RTC_SET_TIME )/* struct rtc_time only has ints */ -HANDLE_IOCTL (RTC_IRQP_READ , w_long) -COMPATIBLE_IOCTL (RTC_IRQP_SET ) -HANDLE_IOCTL (RTC_EPOCH_READ , w_long) -COMPATIBLE_IOCTL (RTC_EPOCH_SET ) -#endif - IOCTL_TABLE_ENDint ioctl_table_size =ARRAY_SIZE (ioctl_start);
arch/x86_64/ia32/ia32_ioctl.c +0 -47
59 lines not on this page · raw message
fs/compat_ioctl.c +47 -0
59 lines not on this page · raw message
Quoted 4 lines · Christoph Hellwig
parisc used
COMPAT_IOCTLor genericw_longhandlers for these whichce is wrong and can't work because the ioctls encode sizeof(unsigned long) in their ioctl number. parisc also duplicatedCOMPAT_IOCTLentries for other rtc ioctls which I remove in this patch, too.
ACK.
From: Christoph Hellwig <[email protected]>
Date: Tue, 13 Dec 2005 18:23:12 +0100
Quoted 10 lines
This patch implements generic handling of
RTC_IRQP_READ32,RTC_IRQP_SET32,RTC_EPOCH_READ32andRTC_EPOCH_SET32infs/compat_ioctl.c. It's based on thex86_64code which needed a little massaging to be endian-clean.parisc used
COMPAT_IOCTLor genericw_longhandlers for these whichce is wrong and can't work because the ioctls encode sizeof(unsigned long) in their ioctl number. parisc also duplicatedCOMPAT_IOCTLentries for other rtc ioctls which I remove in this patch, too.Signed-off-by Christoph Hellwig <[email protected]>
Looks good to me.