diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2022-10-01 02:52:07 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-10-18 15:00:01 +0200 |
commit | ea418b35103a98329cb019927cc3668c3759b9eb (patch) | |
tree | 5a319bf57f5e609a6286cd14bcba881456ff5bdf /drivers/hid/hid-mcp2221.c | |
parent | HID: mcp2221: switch i2c registration to devm functions (diff) | |
download | linux-ea418b35103a98329cb019927cc3668c3759b9eb.tar.xz linux-ea418b35103a98329cb019927cc3668c3759b9eb.zip |
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: Matt Ranostay <matt.ranostay@konsulko.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-mcp2221.c')
-rw-r--r-- | drivers/hid/hid-mcp2221.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c index 4d10a24e3e13..fb54f1c6fd9c 100644 --- a/drivers/hid/hid-mcp2221.c +++ b/drivers/hid/hid-mcp2221.c @@ -915,9 +915,11 @@ static int mcp2221_probe(struct hid_device *hdev, mcp->gc->can_sleep = 1; mcp->gc->parent = &hdev->dev; +#if IS_REACHABLE(CONFIG_GPIOLIB) ret = devm_gpiochip_add_data(&hdev->dev, mcp->gc, mcp); if (ret) return ret; +#endif return 0; } |