lkml.org 
[lkml]   [2011]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] [PATCH 6/10] Generic Watchdog Timer Driver
Hi Jamie,

> I don't fully understand why the module refcounting is done in the open
> and release though. If you moved it into the registration and
> unregistration then doesn't that remove the need for WDOG_ORPHAN?

Hmm, nice suggestion. Will look into that.

> > diff --git a/drivers/watchdog/core/watchdog_core.c b/drivers/watchdog/core/watchdog_core.c
> > index 52bc520..d1a824e 100644
> > --- a/drivers/watchdog/core/watchdog_core.c
> > +++ b/drivers/watchdog/core/watchdog_core.c
> > @@ -60,6 +60,10 @@ int register_watchdogdevice(struct watchdog_device *wdd)
> > if (wdd == NULL || wdd->info == NULL || wdd->ops == NULL)
> > return -ENODATA;
> >
> > + /* Make sure that the owner of the watchdog operations exists */
> > + if (wdd->ops->owner == NULL)
> > + return -ENODATA;
>
> Won't this be effectively NULL if the module is builtin? It looks like
> if it is builtin then THIS_MODULE would be defined as (struct module
> *)0.

Same for this: I will look into this.

Thanks,
Wim.



\
 
 \ /
  Last update: 2011-03-03 11:47    [W:0.046 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site