Re: [PULL] nGene driver - http://endriss@xxxxxxxxxxx/hg/~endriss/ngene

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

 



Hi,

Oliver Endriss wrote:
> Mauro Carvalho Chehab wrote:
> > Oliver Endriss wrote:
> > > Mauro Carvalho Chehab wrote:
> > >> After applying all the patches, I'm getting this error:
> > >>
> > >> drivers/media/dvb/ngene/ngene-core.c: In function ‘ngene_i2c_init’:
> > >> drivers/media/dvb/ngene/ngene-core.c:860: warning: passing argument 1 of ‘__mutex_init’ from incompatible pointer type
> > >>
> > >> On this line:
> > >>         mutex_init(&adap->bus_lock);
> > > 
> > > Strange, I do not get any warnings with kernel 2.6.32.3 and gcc 4.1.2.
> > > 
> > > The line causing the problems is
> > > 
> > > mutex_init(&adap->bus_lock);
> > > 
> > > mutex.h:
> > > # define mutex_init(mutex) \
> > >         ...
> > >         __mutex_init((mutex), #mutex, &__key);          \
> > >         ...
> > > 
> > > extern void __mutex_init(struct mutex *lock, const char *name,
> > >                          struct lock_class_key *key);
> > > 
> > > adap is a pointer to 'struct i2c_adapter':
> > > 
> > > i2c.h:
> > > struct i2c_adapter {
> > >         ...
> > >         struct mutex bus_lock;
> > >         ...
> > > 
> > > I do not see any problem here.
> > 
> > Ah, the realtime patches:
> > 
> > drivers/i2c/i2c-core.c: rt_mutex_init(&adap->bus_lock);
> > 
> > Several mutexes are currently changing, to improve kernel responsiveness.
> > 
> > > 
> > > Something must have been changed in recent git.
> > > 
> > > Could you try if
> > >   #include <linux/mutex.h>
> > > helps?
> > 
> > It doesn't. It is really a bad idea to initialize an i2c mutex inside the driver.
> 
> Ack. See below.
> 
> > Instead, the driver should be calling i2c_register_adapter().
> 
> No, i2c_register_adapter() is a static function.
> 
> i2c_add_adapter is the right way. As it calls i2c_register_adapter(),
> mutex_init() can be removed, and everything is fine.

I committed a fix for both I2C issues.
Please pull http://linuxtv.org/hg/~endriss/ngene/rev/d3b4eb4a7bd9

CU
Oliver

-- 
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux