[i2c] [PATCH 5/6] i2c: i2c_adapter drivers need no driver
David Brownell
david-b at pacbell.net
Thu Feb 15 21:24:19 CET 2007
On Thursday 15 February 2007 5:26 am, Jean Delvare wrote:
> This patch appears to have a nasty side effect on log messages. When
> using dev_info and friends on i2c-adapter (virtual) devices, the
> message prefix is something like:
> i2c-1: adapter [Parallel port adapter] registered
> While it should be:
> i2c_adapter i2c-1: adapter [Parallel port adapter] registered
>
> The driver name is missing, of course, as there no longer is a driver.
This would not be the case if the code used
dev_info(adapter->dev.parent, "...\n");
instead of
dev_info(&adapter->dev, "...\n")
Plus, the named driver and device would make more sense: they'd match
the actual hardware, not some pseudo-device ("i2c-1" etc). When there's
a real hardware device and driver to associate with an event, it seems
to me very wrong to couple messages to a pseudo-device.
The previous patches used adapter->cdev.dev, same positive result: the
messages weren't coupled to a pseudo-device.
- Dave
More information about the i2c
mailing list