Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c

From: Alan Cox
Date: Sat Sep 20 2008 - 13:07:52 EST


> One could argue that this idiom is ugly ... and fix it by having
> misc_open() in drivers/char/misc.c initialize i_private before
> delegating to the miscdevice->fops->open(). Even just setting
> it to the miscdevice pointer would suffice with this driver;
> container_of(i_private, struct omap_wdt_dev, omap_wdt_miscdev)
> would then return what get_drvdata() returns, sans global.
>
> But that wouldn't be just cleaning up this watchdog.

There are a couple of takes are reworking all the watchdog core code to
get rid of that stuff - so its probably not worth worrying about as
pretty soon I'd hope watchdogs are mostly using one of the new interfaces
and taking struct watchdog for ops (and in the case of the watchdog core
code I proposed don't even usually need open methods at all)

Alan
--
#include <stdsig.h>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/