summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-mcp2221.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2022-09-30 17:52:07 -0700
committerJiri Kosina <jkosina@suse.cz>2022-10-18 15:00:01 +0200
commitea418b35103a98329cb019927cc3668c3759b9eb (patch)
tree5a319bf57f5e609a6286cd14bcba881456ff5bdf /drivers/hid/hid-mcp2221.c
parentdeb3b88bbb7a197152aee1eb0157283a6914d504 (diff)
downloadlinux-stable-ea418b35103a98329cb019927cc3668c3759b9eb.tar.gz
linux-stable-ea418b35103a98329cb019927cc3668c3759b9eb.tar.bz2
linux-stable-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.c2
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;
}