Re: linux-next: driver-core tree build failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 22, 2008 at 02:50:46PM +0000, Mark McLoughlin wrote:
> On Mon, 2008-12-22 at 23:59 +1100, Stephen Rothwell wrote:
> > Hi Greg,
> > 
> > Today's linux-next build (powerpc allnoconfig) failed like this:
> > 
> > drivers/base/core.c: In function '__root_device_register':
> > drivers/base/core.c:1277: error: dereferencing pointer to incomplete type
> > 
> > Caused by bf86dbd2451d1012c2c968a960470e485b869f5b ("driver core: add
> > root_device_register()").  This needs to cope with !CONFIG_MODULES (where
> > struct module is not defined).
> 
> Ouch, my bad.
> 
> > I applied the following patch but only for today because it is too hard
> > to revert the above patch ...
> > 
> > -- 
> > Cheers,
> > Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx
> > http://www.canb.auug.org.au/~sfr/
> > 
> > From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> > Date: Mon, 22 Dec 2008 23:50:56 +1100
> > Subject: [PATCH] driver core: fix root_device_register for not CONFIG_MODULES
> > 
> > Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> > ---
> >  drivers/base/core.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > index 6fbdd8b..aa93980 100644
> > --- a/drivers/base/core.c
> > +++ b/drivers/base/core.c
> > @@ -1273,6 +1273,7 @@ struct device *__root_device_register(const char *name, struct module *owner)
> >  		return ERR_PTR(err);
> >  	}
> >  
> > +#ifdef CONFIG_MODULE
> >  	if (owner) {
> >  		struct module_kobject *mk = &owner->mkobj;
> >  
> > @@ -1283,6 +1284,7 @@ struct device *__root_device_register(const char *name, struct module *owner)
> >  		}
> >  		root->owner = owner;
> >  	}
> > +#endif
> 
> Yep, looks correct to me ...

Ick, I hate ifdefs...  I'll go fix this up.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux