Skip to content

Commit b1dc3c6

Browse files
andy-shevmarckleinebudde
authored andcommitted
can: mcp251x: Fix up includes
This driver is including the legacy GPIO header <linux/gpio.h> but the only thing it is using from that header is the wrong define for GPIOF_DIR_OUT. Fix it up by using GPIO_LINE_DIRECTION_* macros respectively. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20240412173332.186685-1-andriy.shevchenko@linux.intel.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 7e8fcb8 commit b1dc3c6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/net/can/spi/mcp251x.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <linux/device.h>
2929
#include <linux/ethtool.h>
3030
#include <linux/freezer.h>
31-
#include <linux/gpio.h>
3231
#include <linux/gpio/driver.h>
3332
#include <linux/interrupt.h>
3433
#include <linux/io.h>
@@ -482,9 +481,9 @@ static int mcp251x_gpio_get_direction(struct gpio_chip *chip,
482481
unsigned int offset)
483482
{
484483
if (mcp251x_gpio_is_input(offset))
485-
return GPIOF_DIR_IN;
484+
return GPIO_LINE_DIRECTION_IN;
486485

487-
return GPIOF_DIR_OUT;
486+
return GPIO_LINE_DIRECTION_OUT;
488487
}
489488

490489
static int mcp251x_gpio_get(struct gpio_chip *chip, unsigned int offset)

0 commit comments

Comments
 (0)