i2c: quirks: add zero length checks
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 23 Jul 2018 20:26:05 +0000 (22:26 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 4 Aug 2018 21:24:03 +0000 (23:24 +0200)
commitd9cfe2ce246845b9cca0ec1b881e826965893c58
tree604dbf94802ce0e237e651cfb9bec2c6739827e8
parent5799c4b2f1dbc0166d9b1d94443deaafc6e7a070
i2c: quirks: add zero length checks

Some adapters do not support a message length of 0. Add this as a quirk
so drivers don't have to open code it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core-base.c
include/linux/i2c.h