Skip to content

Commit

Permalink
can: mcp251x: Fix up includes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
andy-shev authored and marckleinebudde committed Jun 20, 2024
1 parent 7e8fcb8 commit b1dc3c6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/can/spi/mcp251x.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <linux/device.h>
#include <linux/ethtool.h>
#include <linux/freezer.h>
#include <linux/gpio.h>
#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/io.h>
Expand Down Expand Up @@ -482,9 +481,9 @@ static int mcp251x_gpio_get_direction(struct gpio_chip *chip,
unsigned int offset)
{
if (mcp251x_gpio_is_input(offset))
return GPIOF_DIR_IN;
return GPIO_LINE_DIRECTION_IN;

return GPIOF_DIR_OUT;
return GPIO_LINE_DIRECTION_OUT;
}

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

0 comments on commit b1dc3c6

Please sign in to comment.