Commit b6dfb247 authored by Arnd Bergmann's avatar Arnd Bergmann

compat_ioctl: move WDIOC handling into wdt drivers

All watchdog drivers implement the same set of ioctl commands, and
fortunately all of them are compatible between 32-bit and 64-bit
architectures.

Modern drivers always go through drivers/watchdog/wdt.c as an abstraction
layer, but older ones implement their own file_operations on a character
device for this.

Move the handling from fs/compat_ioctl.c into the individual drivers.

Note that most of the legacy drivers will never be used on 64-bit
hardware, because they are for an old 32-bit SoC implementation, but
doing them all at once is safer than trying to guess which ones do
or do not need the compat_ioctl handling.
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 314999dc
...@@ -650,6 +650,7 @@ static const struct file_operations mpc52xx_wdt_fops = { ...@@ -650,6 +650,7 @@ static const struct file_operations mpc52xx_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = mpc52xx_wdt_write, .write = mpc52xx_wdt_write,
.unlocked_ioctl = mpc52xx_wdt_ioctl, .unlocked_ioctl = mpc52xx_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = mpc52xx_wdt_open, .open = mpc52xx_wdt_open,
.release = mpc52xx_wdt_release, .release = mpc52xx_wdt_release,
}; };
......
...@@ -165,6 +165,7 @@ static const struct file_operations harddog_fops = { ...@@ -165,6 +165,7 @@ static const struct file_operations harddog_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.write = harddog_write, .write = harddog_write,
.unlocked_ioctl = harddog_ioctl, .unlocked_ioctl = harddog_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = harddog_open, .open = harddog_open,
.release = harddog_release, .release = harddog_release,
.llseek = no_llseek, .llseek = no_llseek,
......
...@@ -893,6 +893,7 @@ static const struct file_operations ipmi_wdog_fops = { ...@@ -893,6 +893,7 @@ static const struct file_operations ipmi_wdog_fops = {
.poll = ipmi_poll, .poll = ipmi_poll,
.write = ipmi_write, .write = ipmi_write,
.unlocked_ioctl = ipmi_unlocked_ioctl, .unlocked_ioctl = ipmi_unlocked_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = ipmi_open, .open = ipmi_open,
.release = ipmi_close, .release = ipmi_close,
.fasync = ipmi_fasync, .fasync = ipmi_fasync,
......
...@@ -954,6 +954,7 @@ static const struct file_operations watchdog_fops = { ...@@ -954,6 +954,7 @@ static const struct file_operations watchdog_fops = {
.release = watchdog_release, .release = watchdog_release,
.write = watchdog_write, .write = watchdog_write,
.unlocked_ioctl = watchdog_ioctl, .unlocked_ioctl = watchdog_ioctl,
.compat_ioctl = compat_ptr_ioctl,
}; };
......
...@@ -1458,6 +1458,7 @@ static const struct file_operations watchdog_fops = { ...@@ -1458,6 +1458,7 @@ static const struct file_operations watchdog_fops = {
.release = watchdog_close, .release = watchdog_close,
.write = watchdog_write, .write = watchdog_write,
.unlocked_ioctl = watchdog_ioctl, .unlocked_ioctl = watchdog_ioctl,
.compat_ioctl = compat_ptr_ioctl,
}; };
/* /*
......
...@@ -586,6 +586,7 @@ static const struct file_operations ds1374_wdt_fops = { ...@@ -586,6 +586,7 @@ static const struct file_operations ds1374_wdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = ds1374_wdt_read, .read = ds1374_wdt_read,
.unlocked_ioctl = ds1374_wdt_unlocked_ioctl, .unlocked_ioctl = ds1374_wdt_unlocked_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.write = ds1374_wdt_write, .write = ds1374_wdt_write,
.open = ds1374_wdt_open, .open = ds1374_wdt_open,
.release = ds1374_wdt_release, .release = ds1374_wdt_release,
......
...@@ -840,6 +840,7 @@ static const struct file_operations wdt_fops = { ...@@ -840,6 +840,7 @@ static const struct file_operations wdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = wdt_read, .read = wdt_read,
.unlocked_ioctl = wdt_unlocked_ioctl, .unlocked_ioctl = wdt_unlocked_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.write = wdt_write, .write = wdt_write,
.open = wdt_open, .open = wdt_open,
.release = wdt_release, .release = wdt_release,
......
...@@ -221,6 +221,7 @@ static const struct file_operations acq_fops = { ...@@ -221,6 +221,7 @@ static const struct file_operations acq_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = acq_write, .write = acq_write,
.unlocked_ioctl = acq_ioctl, .unlocked_ioctl = acq_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = acq_open, .open = acq_open,
.release = acq_close, .release = acq_close,
}; };
......
...@@ -220,6 +220,7 @@ static const struct file_operations advwdt_fops = { ...@@ -220,6 +220,7 @@ static const struct file_operations advwdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = advwdt_write, .write = advwdt_write,
.unlocked_ioctl = advwdt_ioctl, .unlocked_ioctl = advwdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = advwdt_open, .open = advwdt_open,
.release = advwdt_close, .release = advwdt_close,
}; };
......
...@@ -362,6 +362,7 @@ static const struct file_operations ali_fops = { ...@@ -362,6 +362,7 @@ static const struct file_operations ali_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = ali_write, .write = ali_write,
.unlocked_ioctl = ali_ioctl, .unlocked_ioctl = ali_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = ali_open, .open = ali_open,
.release = ali_release, .release = ali_release,
}; };
......
...@@ -294,6 +294,7 @@ static const struct file_operations wdt_fops = { ...@@ -294,6 +294,7 @@ static const struct file_operations wdt_fops = {
.open = fop_open, .open = fop_open,
.release = fop_close, .release = fop_close,
.unlocked_ioctl = fop_ioctl, .unlocked_ioctl = fop_ioctl,
.compat_ioctl = compat_ptr_ioctl,
}; };
static struct miscdevice wdt_miscdev = { static struct miscdevice wdt_miscdev = {
......
...@@ -250,6 +250,7 @@ static const struct file_operations ar7_wdt_fops = { ...@@ -250,6 +250,7 @@ static const struct file_operations ar7_wdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.write = ar7_wdt_write, .write = ar7_wdt_write,
.unlocked_ioctl = ar7_wdt_ioctl, .unlocked_ioctl = ar7_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = ar7_wdt_open, .open = ar7_wdt_open,
.release = ar7_wdt_release, .release = ar7_wdt_release,
.llseek = no_llseek, .llseek = no_llseek,
......
...@@ -213,6 +213,7 @@ static const struct file_operations at91wdt_fops = { ...@@ -213,6 +213,7 @@ static const struct file_operations at91wdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.llseek = no_llseek, .llseek = no_llseek,
.unlocked_ioctl = at91_wdt_ioctl, .unlocked_ioctl = at91_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = at91_wdt_open, .open = at91_wdt_open,
.release = at91_wdt_close, .release = at91_wdt_close,
.write = at91_wdt_write, .write = at91_wdt_write,
......
...@@ -234,6 +234,7 @@ static const struct file_operations ath79_wdt_fops = { ...@@ -234,6 +234,7 @@ static const struct file_operations ath79_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = ath79_wdt_write, .write = ath79_wdt_write,
.unlocked_ioctl = ath79_wdt_ioctl, .unlocked_ioctl = ath79_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = ath79_wdt_open, .open = ath79_wdt_open,
.release = ath79_wdt_release, .release = ath79_wdt_release,
}; };
......
...@@ -221,6 +221,7 @@ static const struct file_operations bcm63xx_wdt_fops = { ...@@ -221,6 +221,7 @@ static const struct file_operations bcm63xx_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = bcm63xx_wdt_write, .write = bcm63xx_wdt_write,
.unlocked_ioctl = bcm63xx_wdt_ioctl, .unlocked_ioctl = bcm63xx_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = bcm63xx_wdt_open, .open = bcm63xx_wdt_open,
.release = bcm63xx_wdt_release, .release = bcm63xx_wdt_release,
}; };
......
...@@ -187,6 +187,7 @@ static const struct file_operations cpu5wdt_fops = { ...@@ -187,6 +187,7 @@ static const struct file_operations cpu5wdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.llseek = no_llseek, .llseek = no_llseek,
.unlocked_ioctl = cpu5wdt_ioctl, .unlocked_ioctl = cpu5wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = cpu5wdt_open, .open = cpu5wdt_open,
.write = cpu5wdt_write, .write = cpu5wdt_write,
.release = cpu5wdt_release, .release = cpu5wdt_release,
......
...@@ -371,6 +371,7 @@ static const struct file_operations eurwdt_fops = { ...@@ -371,6 +371,7 @@ static const struct file_operations eurwdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = eurwdt_write, .write = eurwdt_write,
.unlocked_ioctl = eurwdt_ioctl, .unlocked_ioctl = eurwdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = eurwdt_open, .open = eurwdt_open,
.release = eurwdt_release, .release = eurwdt_release,
}; };
......
...@@ -669,6 +669,7 @@ static const struct file_operations watchdog_fops = { ...@@ -669,6 +669,7 @@ static const struct file_operations watchdog_fops = {
.release = watchdog_release, .release = watchdog_release,
.write = watchdog_write, .write = watchdog_write,
.unlocked_ioctl = watchdog_ioctl, .unlocked_ioctl = watchdog_ioctl,
.compat_ioctl = compat_ptr_ioctl,
}; };
static struct miscdevice watchdog_miscdev = { static struct miscdevice watchdog_miscdev = {
......
...@@ -248,6 +248,7 @@ static const struct file_operations gef_wdt_fops = { ...@@ -248,6 +248,7 @@ static const struct file_operations gef_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = gef_wdt_write, .write = gef_wdt_write,
.unlocked_ioctl = gef_wdt_ioctl, .unlocked_ioctl = gef_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = gef_wdt_open, .open = gef_wdt_open,
.release = gef_wdt_release, .release = gef_wdt_release,
}; };
......
...@@ -201,6 +201,7 @@ static const struct file_operations geodewdt_fops = { ...@@ -201,6 +201,7 @@ static const struct file_operations geodewdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = geodewdt_write, .write = geodewdt_write,
.unlocked_ioctl = geodewdt_ioctl, .unlocked_ioctl = geodewdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = geodewdt_open, .open = geodewdt_open,
.release = geodewdt_release, .release = geodewdt_release,
}; };
......
...@@ -259,6 +259,7 @@ static const struct file_operations ibwdt_fops = { ...@@ -259,6 +259,7 @@ static const struct file_operations ibwdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = ibwdt_write, .write = ibwdt_write,
.unlocked_ioctl = ibwdt_ioctl, .unlocked_ioctl = ibwdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = ibwdt_open, .open = ibwdt_open,
.release = ibwdt_close, .release = ibwdt_close,
}; };
......
...@@ -344,6 +344,7 @@ static const struct file_operations asr_fops = { ...@@ -344,6 +344,7 @@ static const struct file_operations asr_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = asr_write, .write = asr_write,
.unlocked_ioctl = asr_ioctl, .unlocked_ioctl = asr_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = asr_open, .open = asr_open,
.release = asr_release, .release = asr_release,
}; };
......
...@@ -152,6 +152,7 @@ static const struct file_operations indydog_fops = { ...@@ -152,6 +152,7 @@ static const struct file_operations indydog_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = indydog_write, .write = indydog_write,
.unlocked_ioctl = indydog_ioctl, .unlocked_ioctl = indydog_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = indydog_open, .open = indydog_open,
.release = indydog_release, .release = indydog_release,
}; };
......
...@@ -412,6 +412,7 @@ static const struct file_operations intel_scu_fops = { ...@@ -412,6 +412,7 @@ static const struct file_operations intel_scu_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = intel_scu_write, .write = intel_scu_write,
.unlocked_ioctl = intel_scu_ioctl, .unlocked_ioctl = intel_scu_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = intel_scu_open, .open = intel_scu_open,
.release = intel_scu_release, .release = intel_scu_release,
}; };
......
...@@ -202,6 +202,7 @@ static const struct file_operations iop_wdt_fops = { ...@@ -202,6 +202,7 @@ static const struct file_operations iop_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = iop_wdt_write, .write = iop_wdt_write,
.unlocked_ioctl = iop_wdt_ioctl, .unlocked_ioctl = iop_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = iop_wdt_open, .open = iop_wdt_open,
.release = iop_wdt_release, .release = iop_wdt_release,
}; };
......
...@@ -345,6 +345,7 @@ static const struct file_operations it8712f_wdt_fops = { ...@@ -345,6 +345,7 @@ static const struct file_operations it8712f_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = it8712f_wdt_write, .write = it8712f_wdt_write,
.unlocked_ioctl = it8712f_wdt_ioctl, .unlocked_ioctl = it8712f_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = it8712f_wdt_open, .open = it8712f_wdt_open,
.release = it8712f_wdt_release, .release = it8712f_wdt_release,
}; };
......
...@@ -163,6 +163,7 @@ static const struct file_operations ixp4xx_wdt_fops = { ...@@ -163,6 +163,7 @@ static const struct file_operations ixp4xx_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = ixp4xx_wdt_write, .write = ixp4xx_wdt_write,
.unlocked_ioctl = ixp4xx_wdt_ioctl, .unlocked_ioctl = ixp4xx_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = ixp4xx_wdt_open, .open = ixp4xx_wdt_open,
.release = ixp4xx_wdt_release, .release = ixp4xx_wdt_release,
}; };
......
...@@ -183,6 +183,7 @@ static const struct file_operations m54xx_wdt_fops = { ...@@ -183,6 +183,7 @@ static const struct file_operations m54xx_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = m54xx_wdt_write, .write = m54xx_wdt_write,
.unlocked_ioctl = m54xx_wdt_ioctl, .unlocked_ioctl = m54xx_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = m54xx_wdt_open, .open = m54xx_wdt_open,
.release = m54xx_wdt_release, .release = m54xx_wdt_release,
}; };
......
...@@ -361,6 +361,7 @@ static const struct file_operations zf_fops = { ...@@ -361,6 +361,7 @@ static const struct file_operations zf_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = zf_write, .write = zf_write,
.unlocked_ioctl = zf_ioctl, .unlocked_ioctl = zf_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = zf_open, .open = zf_open,
.release = zf_close, .release = zf_close,
}; };
......
...@@ -227,6 +227,7 @@ static const struct file_operations mixcomwd_fops = { ...@@ -227,6 +227,7 @@ static const struct file_operations mixcomwd_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = mixcomwd_write, .write = mixcomwd_write,
.unlocked_ioctl = mixcomwd_ioctl, .unlocked_ioctl = mixcomwd_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = mixcomwd_open, .open = mixcomwd_open,
.release = mixcomwd_release, .release = mixcomwd_release,
}; };
......
...@@ -181,6 +181,7 @@ static const struct file_operations mtx1_wdt_fops = { ...@@ -181,6 +181,7 @@ static const struct file_operations mtx1_wdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.llseek = no_llseek, .llseek = no_llseek,
.unlocked_ioctl = mtx1_wdt_ioctl, .unlocked_ioctl = mtx1_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = mtx1_wdt_open, .open = mtx1_wdt_open,
.write = mtx1_wdt_write, .write = mtx1_wdt_write,
.release = mtx1_wdt_release, .release = mtx1_wdt_release,
......
...@@ -241,6 +241,7 @@ static const struct file_operations mv64x60_wdt_fops = { ...@@ -241,6 +241,7 @@ static const struct file_operations mv64x60_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = mv64x60_wdt_write, .write = mv64x60_wdt_write,
.unlocked_ioctl = mv64x60_wdt_ioctl, .unlocked_ioctl = mv64x60_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = mv64x60_wdt_open, .open = mv64x60_wdt_open,
.release = mv64x60_wdt_release, .release = mv64x60_wdt_release,
}; };
......
...@@ -267,6 +267,7 @@ static const struct file_operations nv_tco_fops = { ...@@ -267,6 +267,7 @@ static const struct file_operations nv_tco_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = nv_tco_write, .write = nv_tco_write,
.unlocked_ioctl = nv_tco_ioctl, .unlocked_ioctl = nv_tco_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = nv_tco_open, .open = nv_tco_open,
.release = nv_tco_release, .release = nv_tco_release,
}; };
......
...@@ -473,6 +473,7 @@ static const struct file_operations pc87413_fops = { ...@@ -473,6 +473,7 @@ static const struct file_operations pc87413_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = pc87413_write, .write = pc87413_write,
.unlocked_ioctl = pc87413_ioctl, .unlocked_ioctl = pc87413_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = pc87413_open, .open = pc87413_open,
.release = pc87413_release, .release = pc87413_release,
}; };
......
...@@ -752,6 +752,7 @@ static const struct file_operations pcwd_fops = { ...@@ -752,6 +752,7 @@ static const struct file_operations pcwd_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = pcwd_write, .write = pcwd_write,
.unlocked_ioctl = pcwd_ioctl, .unlocked_ioctl = pcwd_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = pcwd_open, .open = pcwd_open,
.release = pcwd_close, .release = pcwd_close,
}; };
......
...@@ -646,6 +646,7 @@ static const struct file_operations pcipcwd_fops = { ...@@ -646,6 +646,7 @@ static const struct file_operations pcipcwd_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = pcipcwd_write, .write = pcipcwd_write,
.unlocked_ioctl = pcipcwd_ioctl, .unlocked_ioctl = pcipcwd_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = pcipcwd_open, .open = pcipcwd_open,
.release = pcipcwd_release, .release = pcipcwd_release,
}; };
......
...@@ -550,6 +550,7 @@ static const struct file_operations usb_pcwd_fops = { ...@@ -550,6 +550,7 @@ static const struct file_operations usb_pcwd_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = usb_pcwd_write, .write = usb_pcwd_write,
.unlocked_ioctl = usb_pcwd_ioctl, .unlocked_ioctl = usb_pcwd_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = usb_pcwd_open, .open = usb_pcwd_open,
.release = usb_pcwd_release, .release = usb_pcwd_release,
}; };
......
...@@ -214,6 +214,7 @@ static const struct file_operations pikawdt_fops = { ...@@ -214,6 +214,7 @@ static const struct file_operations pikawdt_fops = {
.release = pikawdt_release, .release = pikawdt_release,
.write = pikawdt_write, .write = pikawdt_write,
.unlocked_ioctl = pikawdt_ioctl, .unlocked_ioctl = pikawdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
}; };
static struct miscdevice pikawdt_miscdev = { static struct miscdevice pikawdt_miscdev = {
......
...@@ -215,6 +215,7 @@ static const struct file_operations pnx833x_wdt_fops = { ...@@ -215,6 +215,7 @@ static const struct file_operations pnx833x_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = pnx833x_wdt_write, .write = pnx833x_wdt_write,
.unlocked_ioctl = pnx833x_wdt_ioctl, .unlocked_ioctl = pnx833x_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = pnx833x_wdt_open, .open = pnx833x_wdt_open,
.release = pnx833x_wdt_release, .release = pnx833x_wdt_release,
}; };
......
...@@ -245,6 +245,7 @@ static const struct file_operations rc32434_wdt_fops = { ...@@ -245,6 +245,7 @@ static const struct file_operations rc32434_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = rc32434_wdt_write, .write = rc32434_wdt_write,
.unlocked_ioctl = rc32434_wdt_ioctl, .unlocked_ioctl = rc32434_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = rc32434_wdt_open, .open = rc32434_wdt_open,
.release = rc32434_wdt_release, .release = rc32434_wdt_release,
}; };
......
...@@ -199,6 +199,7 @@ static const struct file_operations rdc321x_wdt_fops = { ...@@ -199,6 +199,7 @@ static const struct file_operations rdc321x_wdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.llseek = no_llseek, .llseek = no_llseek,
.unlocked_ioctl = rdc321x_wdt_ioctl, .unlocked_ioctl = rdc321x_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = rdc321x_wdt_open, .open = rdc321x_wdt_open,
.write = rdc321x_wdt_write, .write = rdc321x_wdt_write,
.release = rdc321x_wdt_release, .release = rdc321x_wdt_release,
......
...@@ -163,6 +163,7 @@ static const struct file_operations riowd_fops = { ...@@ -163,6 +163,7 @@ static const struct file_operations riowd_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.llseek = no_llseek, .llseek = no_llseek,
.unlocked_ioctl = riowd_ioctl, .unlocked_ioctl = riowd_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = riowd_open, .open = riowd_open,
.write = riowd_write, .write = riowd_write,
.release = riowd_release, .release = riowd_release,
......
...@@ -141,6 +141,7 @@ static const struct file_operations sa1100dog_fops = { ...@@ -141,6 +141,7 @@ static const struct file_operations sa1100dog_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = sa1100dog_write, .write = sa1100dog_write,
.unlocked_ioctl = sa1100dog_ioctl, .unlocked_ioctl = sa1100dog_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = sa1100dog_open, .open = sa1100dog_open,
.release = sa1100dog_release, .release = sa1100dog_release,
}; };
......
...@@ -237,6 +237,7 @@ static const struct file_operations sbwdog_fops = { ...@@ -237,6 +237,7 @@ static const struct file_operations sbwdog_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = sbwdog_write, .write = sbwdog_write,
.unlocked_ioctl = sbwdog_ioctl, .unlocked_ioctl = sbwdog_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = sbwdog_open, .open = sbwdog_open,
.release = sbwdog_release, .release = sbwdog_release,
}; };
......
...@@ -280,6 +280,7 @@ static const struct file_operations wdt_fops = { ...@@ -280,6 +280,7 @@ static const struct file_operations wdt_fops = {
.open = fop_open, .open = fop_open,
.release = fop_close, .release = fop_close,
.unlocked_ioctl = fop_ioctl, .unlocked_ioctl = fop_ioctl,
.compat_ioctl = compat_ptr_ioctl,
}; };
static struct miscdevice wdt_miscdev = { static struct miscdevice wdt_miscdev = {
......
...@@ -211,6 +211,7 @@ static const struct file_operations wdt_fops = { ...@@ -211,6 +211,7 @@ static const struct file_operations wdt_fops = {
.open = fop_open, .open = fop_open,
.release = fop_close, .release = fop_close,
.unlocked_ioctl = fop_ioctl, .unlocked_ioctl = fop_ioctl,
.compat_ioctl = compat_ptr_ioctl,
}; };
static struct miscdevice wdt_miscdev = { static struct miscdevice wdt_miscdev = {
......
...@@ -156,6 +156,7 @@ static const struct file_operations epx_c3_fops = { ...@@ -156,6 +156,7 @@ static const struct file_operations epx_c3_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = epx_c3_write, .write = epx_c3_write,
.unlocked_ioctl = epx_c3_ioctl, .unlocked_ioctl = epx_c3_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = epx_c3_open, .open = epx_c3_open,
.release = epx_c3_release, .release = epx_c3_release,
}; };
......
...@@ -186,6 +186,7 @@ static const struct file_operations fitpc2_wdt_fops = { ...@@ -186,6 +186,7 @@ static const struct file_operations fitpc2_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = fitpc2_wdt_write, .write = fitpc2_wdt_write,
.unlocked_ioctl = fitpc2_wdt_ioctl, .unlocked_ioctl = fitpc2_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = fitpc2_wdt_open, .open = fitpc2_wdt_open,
.release = fitpc2_wdt_release, .release = fitpc2_wdt_release,
}; };
......
...@@ -307,6 +307,7 @@ static const struct file_operations sc1200wdt_fops = { ...@@ -307,6 +307,7 @@ static const struct file_operations sc1200wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = sc1200wdt_write, .write = sc1200wdt_write,
.unlocked_ioctl = sc1200wdt_ioctl, .unlocked_ioctl = sc1200wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = sc1200wdt_open, .open = sc1200wdt_open,
.release = sc1200wdt_release, .release = sc1200wdt_release,
}; };
......
...@@ -336,6 +336,7 @@ static const struct file_operations wdt_fops = { ...@@ -336,6 +336,7 @@ static const struct file_operations wdt_fops = {
.open = fop_open, .open = fop_open,
.release = fop_close, .release = fop_close,
.unlocked_ioctl = fop_ioctl, .unlocked_ioctl = fop_ioctl,
.compat_ioctl = compat_ptr_ioctl,
}; };
static struct miscdevice wdt_miscdev = { static struct miscdevice wdt_miscdev = {
......
...@@ -337,6 +337,7 @@ static const struct file_operations sch311x_wdt_fops = { ...@@ -337,6 +337,7 @@ static const struct file_operations sch311x_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = sch311x_wdt_write, .write = sch311x_wdt_write,
.unlocked_ioctl = sch311x_wdt_ioctl, .unlocked_ioctl = sch311x_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = sch311x_wdt_open, .open = sch311x_wdt_open,
.release = sch311x_wdt_close, .release = sch311x_wdt_close,
}; };
......
...@@ -201,6 +201,7 @@ static const struct file_operations scx200_wdt_fops = { ...@@ -201,6 +201,7 @@ static const struct file_operations scx200_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = scx200_wdt_write, .write = scx200_wdt_write,
.unlocked_ioctl = scx200_wdt_ioctl, .unlocked_ioctl = scx200_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = scx200_wdt_open, .open = scx200_wdt_open,
.release = scx200_wdt_release, .release = scx200_wdt_release,
}; };
......
...@@ -505,6 +505,7 @@ static const struct file_operations wb_smsc_wdt_fops = { ...@@ -505,6 +505,7 @@ static const struct file_operations wb_smsc_wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = wb_smsc_wdt_write, .write = wb_smsc_wdt_write,
.unlocked_ioctl = wb_smsc_wdt_ioctl, .unlocked_ioctl = wb_smsc_wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = wb_smsc_wdt_open, .open = wb_smsc_wdt_open,
.release = wb_smsc_wdt_release, .release = wb_smsc_wdt_release,
}; };
......
...@@ -304,6 +304,7 @@ static const struct file_operations wdt_fops = { ...@@ -304,6 +304,7 @@ static const struct file_operations wdt_fops = {
.open = fop_open, .open = fop_open,
.release = fop_close, .release = fop_close,
.unlocked_ioctl = fop_ioctl, .unlocked_ioctl = fop_ioctl,
.compat_ioctl = compat_ptr_ioctl,
}; };
static struct miscdevice wdt_miscdev = { static struct miscdevice wdt_miscdev = {
......
...@@ -446,6 +446,7 @@ static const struct file_operations wdt_fops = { ...@@ -446,6 +446,7 @@ static const struct file_operations wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = wdt_write, .write = wdt_write,
.unlocked_ioctl = wdt_ioctl, .unlocked_ioctl = wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = wdt_open, .open = wdt_open,
.release = wdt_release, .release = wdt_release,
}; };
......
...@@ -230,6 +230,7 @@ static const struct file_operations wafwdt_fops = { ...@@ -230,6 +230,7 @@ static const struct file_operations wafwdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = wafwdt_write, .write = wafwdt_write,
.unlocked_ioctl = wafwdt_ioctl, .unlocked_ioctl = wafwdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = wafwdt_open, .open = wafwdt_open,
.release = wafwdt_close, .release = wafwdt_close,
}; };
......
...@@ -933,6 +933,7 @@ static const struct file_operations watchdog_fops = { ...@@ -933,6 +933,7 @@ static const struct file_operations watchdog_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.write = watchdog_write, .write = watchdog_write,
.unlocked_ioctl = watchdog_ioctl, .unlocked_ioctl = watchdog_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = watchdog_open, .open = watchdog_open,
.release = watchdog_release, .release = watchdog_release,
}; };
......
...@@ -472,6 +472,7 @@ static const struct file_operations wdrtas_fops = { ...@@ -472,6 +472,7 @@ static const struct file_operations wdrtas_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = wdrtas_write, .write = wdrtas_write,
.unlocked_ioctl = wdrtas_ioctl, .unlocked_ioctl = wdrtas_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = wdrtas_open, .open = wdrtas_open,
.release = wdrtas_close, .release = wdrtas_close,
}; };
......
...@@ -523,6 +523,7 @@ static const struct file_operations wdt_fops = { ...@@ -523,6 +523,7 @@ static const struct file_operations wdt_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = wdt_write, .write = wdt_write,
.unlocked_ioctl = wdt_ioctl, .unlocked_ioctl = wdt_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = wdt_open, .open = wdt_open,
.release = wdt_release, .release = wdt_release,
}; };
......
...@@ -181,6 +181,7 @@ static const struct file_operations watchdog_fops = { ...@@ -181,6 +181,7 @@ static const struct file_operations watchdog_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = watchdog_write, .write = watchdog_write,
.unlocked_ioctl = watchdog_ioctl, .unlocked_ioctl = watchdog_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = watchdog_open, .open = watchdog_open,
.release = watchdog_release, .release = watchdog_release,
}; };
......
...@@ -422,6 +422,7 @@ static const struct file_operations wdt977_fops = { ...@@ -422,6 +422,7 @@ static const struct file_operations wdt977_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = wdt977_write, .write = wdt977_write,
.unlocked_ioctl = wdt977_ioctl, .unlocked_ioctl = wdt977_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = wdt977_open, .open = wdt977_open,
.release = wdt977_release, .release = wdt977_release,
}; };
......
...@@ -566,6 +566,7 @@ static const struct file_operations wdtpci_fops = { ...@@ -566,6 +566,7 @@ static const struct file_operations wdtpci_fops = {
.llseek = no_llseek, .llseek = no_llseek,
.write = wdtpci_write, .write = wdtpci_write,
.unlocked_ioctl = wdtpci_ioctl, .unlocked_ioctl = wdtpci_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = wdtpci_open, .open = wdtpci_open,
.release = wdtpci_release, .release = wdtpci_release,
}; };
......
...@@ -412,17 +412,6 @@ COMPATIBLE_IOCTL(PPPIOCDISCONN) ...@@ -412,17 +412,6 @@ COMPATIBLE_IOCTL(PPPIOCDISCONN)
COMPATIBLE_IOCTL(PPPIOCATTCHAN) COMPATIBLE_IOCTL(PPPIOCATTCHAN)
COMPATIBLE_IOCTL(PPPIOCGCHAN) COMPATIBLE_IOCTL(PPPIOCGCHAN)
COMPATIBLE_IOCTL(PPPIOCGL2TPSTATS) COMPATIBLE_IOCTL(PPPIOCGL2TPSTATS)
/* Watchdog */
COMPATIBLE_IOCTL(WDIOC_GETSUPPORT)
COMPATIBLE_IOCTL(WDIOC_GETSTATUS)
COMPATIBLE_IOCTL(WDIOC_GETBOOTSTATUS)
COMPATIBLE_IOCTL(WDIOC_GETTEMP)
COMPATIBLE_IOCTL(WDIOC_SETOPTIONS)
COMPATIBLE_IOCTL(WDIOC_KEEPALIVE)
COMPATIBLE_IOCTL(WDIOC_SETTIMEOUT)
COMPATIBLE_IOCTL(WDIOC_GETTIMEOUT)
COMPATIBLE_IOCTL(WDIOC_SETPRETIMEOUT)
COMPATIBLE_IOCTL(WDIOC_GETPRETIMEOUT)
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment