diff mbox series

[1/2] i2c: core: fix compile issue related to incorrect gpio header

Message ID 1511838551-4035-2-git-send-email-preid@electromag.com.au
State Accepted
Headers show
Series i2c: fix compile failures | expand

Commit Message

Phil Reid Nov. 28, 2017, 3:09 a.m. UTC
The correct header to include for the gpiod interface is
<linux/gpio/consumer.h>.

fixes commit 3991c5c80beaf7eb9 ("i2c: Switch to using gpiod interface
for gpio bus recovery")

Signed-off-by: Phil Reid <preid@electromag.com.au>
---
 drivers/i2c/i2c-core-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jarkko Nikula Nov. 28, 2017, 9:04 a.m. UTC | #1
On 11/28/2017 05:09 AM, Phil Reid wrote:
> The correct header to include for the gpiod interface is
> <linux/gpio/consumer.h>.
> 
> fixes commit 3991c5c80beaf7eb9 ("i2c: Switch to using gpiod interface
> for gpio bus recovery")
> 
> Signed-off-by: Phil Reid <preid@electromag.com.au>
> ---
>   drivers/i2c/i2c-core-base.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> index 54ffc8d..bf52cca 100644
> --- a/drivers/i2c/i2c-core-base.c
> +++ b/drivers/i2c/i2c-core-base.c
> @@ -27,7 +27,7 @@
>   #include <linux/delay.h>
>   #include <linux/err.h>
>   #include <linux/errno.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>

Looks like this was masked by CONFIG_GPIOLIB=y.

Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Wolfram Sang Nov. 28, 2017, 9:48 a.m. UTC | #2
On Tue, Nov 28, 2017 at 11:09:10AM +0800, Phil Reid wrote:
> The correct header to include for the gpiod interface is
> <linux/gpio/consumer.h>.
> 
> fixes commit 3991c5c80beaf7eb9 ("i2c: Switch to using gpiod interface
> for gpio bus recovery")

Thanks for the fixes tag, yet please use this format in the future:

Fixes: <sha> ("desc")

like

Fixes: a34a0b6da22540d19e57 ("i2c: designware: move i2c_dw_plat_prepare_clk to common")

Fixed it myself for these two patches.


> Signed-off-by: Phil Reid <preid@electromag.com.au>

Applied to for-next, thanks for the fast reaction!
diff mbox series

Patch

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 54ffc8d..bf52cca 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -27,7 +27,7 @@ 
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/errno.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/i2c-smbus.h>
 #include <linux/idr.h>