Commit ea418b35 authored by Matt Ranostay's avatar Matt Ranostay Committed by Jiri Kosina

HID: mcp2221: change 'select GPIOLIB' to imply

To avoid recursive dependencies on GPIOLIB when 'imply IIO' is requested
with other drivers we should switch GPIOLIB to an imply.

This isn't the most ideal solution but avoids modifiying the Kconfig for
other drivers, and only requires a singular IS_REACHABLE(CONFIG_GPIOLIB)
check.
Signed-off-by: default avatarMatt Ranostay <matt.ranostay@konsulko.com>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent deb3b88b
...@@ -1252,7 +1252,7 @@ config HID_ALPS ...@@ -1252,7 +1252,7 @@ config HID_ALPS
config HID_MCP2221 config HID_MCP2221
tristate "Microchip MCP2221 HID USB-to-I2C/SMbus host support" tristate "Microchip MCP2221 HID USB-to-I2C/SMbus host support"
depends on USB_HID && I2C depends on USB_HID && I2C
depends on GPIOLIB imply GPIOLIB
help help
Provides I2C and SMBUS host adapter functionality over USB-HID Provides I2C and SMBUS host adapter functionality over USB-HID
through MCP2221 device. through MCP2221 device.
......
...@@ -915,9 +915,11 @@ static int mcp2221_probe(struct hid_device *hdev, ...@@ -915,9 +915,11 @@ static int mcp2221_probe(struct hid_device *hdev,
mcp->gc->can_sleep = 1; mcp->gc->can_sleep = 1;
mcp->gc->parent = &hdev->dev; mcp->gc->parent = &hdev->dev;
#if IS_REACHABLE(CONFIG_GPIOLIB)
ret = devm_gpiochip_add_data(&hdev->dev, mcp->gc, mcp); ret = devm_gpiochip_add_data(&hdev->dev, mcp->gc, mcp);
if (ret) if (ret)
return ret; return ret;
#endif
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment