diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2016-04-03 20:44:45 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-04-11 18:54:59 +0200 |
commit | a16d6ebca6efb73f6402f36e5aebf84f61721856 (patch) | |
tree | 149558debefac59bc26ea8576972d804f4354ab1 /drivers/hwmon/adt7411.c | |
parent | e28b124564e648d933337a0708dae1323c518af7 (diff) |
i2c: introduce helper function to get 8 bit address from a message
Drivers do this in various ways, let's use one standard way of doing it.
Note: I2C_M_RD is bit 0, so the code could be simplified. To be extremly
robust and to advertise good coding practices, I still use the ternary
operator and let the compilers do the optimizing job.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/hwmon/adt7411.c')
0 files changed, 0 insertions, 0 deletions