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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Brownell
Date: Saturday, September 20, 2008 - 8:32 am

On Saturday 20 September 2008, Russell King - ARM Linux wrote:

Well, the conventional thing for misc drivers, at any rate.  In
various other drivers, inode->i_private is set up earlier, just
to avoid such a need for globals (or equivalent).

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.

= Dave


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/5] omap watchdog updaes, Felipe Balbi, (Fri Sep 19, 3:32 am)
[PATCH 1/5] watchdog: sync linux-omap changes, Felipe Balbi, (Fri Sep 19, 3:32 am)
[PATCH 2/5] watchdog: another ioremap() fix, Felipe Balbi, (Fri Sep 19, 3:32 am)
[PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, Felipe Balbi, (Fri Sep 19, 3:32 am)
Re: [PATCH 5/5] watchdog: introduce platform_data and remo ..., Russell King - ARM Linux, (Fri Sep 19, 12:04 pm)
Re: [PATCH 1/5] watchdog: sync linux-omap changes, Russell King - ARM Linux, (Fri Sep 19, 3:40 pm)
Re: [PATCH 5/5] watchdog: introduce platform_data and remo ..., Russell King - ARM Linux, (Fri Sep 19, 3:51 pm)
Re: [PATCH 1/5] watchdog: sync linux-omap changes, David Brownell, (Fri Sep 19, 5:20 pm)
Re: [PATCH 1/5] watchdog: sync linux-omap changes, David Brownell, (Fri Sep 19, 5:39 pm)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, David Brownell, (Fri Sep 19, 5:41 pm)
Re: [PATCH 5/5] watchdog: introduce platform_data and remo ..., Wim Van Sebroeck, (Fri Sep 19, 10:48 pm)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, Russell King - ARM Linux, (Sat Sep 20, 1:13 am)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, David Brownell, (Sat Sep 20, 8:32 am)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, Russell King - ARM Linux, (Sat Sep 20, 9:11 am)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, Alan Cox, (Sat Sep 20, 10:01 am)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, David Brownell, (Sat Sep 20, 10:18 am)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, Russell King - ARM Linux, (Sat Sep 20, 11:00 am)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, Tony Lindgren, (Sun Sep 21, 11:41 am)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, David Brownell, (Sun Sep 21, 6:45 pm)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, David Brownell, (Sun Sep 21, 7:01 pm)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, Russell King - ARM Linux, (Mon Sep 22, 12:59 am)
Re: [PATCH 3/5] watchdog: cleanup a bit omap_wdt.c, Tony Lindgren, (Mon Sep 22, 2:30 am)