Messages in this thread |  | | | From | Arnd Bergmann <> | | Subject | Re: [PATCH 2/3, RFC] watchdog dev BKL pushdown | | Date | Tue, 20 May 2008 23:00:34 +0200 |
| |
On Tuesday 20 May 2008, Alan Cox wrote: > Current patch (& example conversions) below.
Very nice code!
> + if (w->ops->ioctl) { > + r = w->ops->ioctl(w, cmd, arg); > + if (r != -ENOIOCTLCMD) > + return r; > + }
Are you planning this as a transitional method for converting drivers, or are you aware of any driver that actually needs its own ioctl method?
> +static const struct file_operations watchdog_fops = { > + .owner = THIS_MODULE, > + .llseek = no_llseek, > + .write = watchdog_write, > + .unlocked_ioctl = watchdog_ioctl, > + .open = watchdog_open, > + .release = watchdog_release, > +};
All the ioctl numbers are compatible, so it would be good to register the watchdog ioctl function as compat_ioctl as well. Once all drivers are using the common abstraction, we can also kill their COMPATIBLE_IOCTL() entries in fs/compat_ioctl.c.
> --- /dev/null > +++ b/drivers/watchdog/watchdog.h
There are a few watchdog drivers living outside of drivers/watchdog/, I could find:
* arch/um/drivers/harddog_kern.c * drivers/char/ipmi/ipmi_watchdog.c * drivers/rtc/rtc-m41t80.c * drivers/s390/char/vmwatchdog.c * drivers/sbus/char/cpwatchdog.c * drivers/sbus/char/riowatchdog.c
In order to conver those to the new model, you either have to move them to the right place, or move the new declarations to include/linux/watchdog.h.
Arnd <>< -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |