Re: Dynamically-allocated i2c_device_id vs MODULE_DEVICE_TABLE

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

 



On Fri, Jan 23, 2009 at 08:23:32PM -0600, Timur Tabi wrote:

> I think I see your point, though.  I'm calling i2c_add_driver, which  
> technically could result in my i2c_probe function being called multiple 
> times, if there are multiple matches in the device tree.  I'll have to 
> check that out on Monday.

Yes, it will - any device specific data must be registered when the
device is registered.  You may want to look at how the wm8900 handles
this, it makes use of the DAI registration functions to make this a
little nicer.  It does still have the same problem but is much closer to
the end result and means you can start registering the driver normally
now.

>> For now an idiomatic solution for ASoC drivers is to have a single
>> static variable that you use to get the socdev through.

> Well, that's what I do today.  I was hoping to avoid that, but if I'm 
> right about i2c_add_driver, then this trick doesn't really work either.

This really isn't something that can be worked around well in the
individual drivers.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux