]> git.ipfire.org Git - thirdparty/linux.git/commit
i2c: Compare the return value of gpiod_get_direction against GPIO_LINE_DIRECTION_OUT
authorNikola Z. Ivanov <zlatistiv@gmail.com>
Wed, 15 Apr 2026 20:50:21 +0000 (23:50 +0300)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 4 May 2026 10:19:25 +0000 (12:19 +0200)
commitb47bc7c022ddab7c79a84dd5f3f0d07fe09ec786
tree5a708678367b7956cb3a52190bbb757465e0f5f7
parent617eb7c0961a8dfcfc811844a6396e406b2923ea
i2c: Compare the return value of gpiod_get_direction against GPIO_LINE_DIRECTION_OUT

The GPIO_LINE_DIRECTION_* definitions have just recently been exposed to
gpio consumers.h by breaking them out in a separate defs.h file.

Use this to validate the gpio direction instead of the hard-coded literal.

Signed-off-by: Nikola Z. Ivanov <zlatistiv@gmail.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-core-base.c