From 824471d63fb24409edbaa18791d32dc9e0855dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Sun, 26 Jun 2016 23:53:25 +0200 Subject: [PATCH 1/3] bone_capemgr: do sysfs_remove_groups() when unloading module Among effects caused by this is that /sys/devices/platforms/bone_capemgr/slots remains left behind, preventing the module from being loaded again. --- drivers/misc/bone_capemgr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/bone_capemgr.c b/drivers/misc/bone_capemgr.c index 094ea7559c86b..54a13dab3e9ac 100644 --- a/drivers/misc/bone_capemgr.c +++ b/drivers/misc/bone_capemgr.c @@ -1850,6 +1850,7 @@ static int capemgr_remove(struct platform_device *pdev) capemgr_remove_slot_no_lock(slot); mutex_unlock(&info->slots_list_mutex); + sysfs_remove_groups(&pdev->dev.kobj, pdev->dev.groups); platform_set_drvdata(pdev, NULL); ret = pm_runtime_get_sync(&pdev->dev); From 61b306dc171531506928e3cc2f46c7a11a6028e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Sun, 26 Jun 2016 23:59:03 +0200 Subject: [PATCH 2/3] usbcore: export usb_match_device & usb_bus_id These symbols needs to exported as they're needed by other drivers which they won't be made available to if built as modules. --- drivers/usb/core/driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 2057d91d83360..72e62b6e5bc61 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -637,6 +637,7 @@ int usb_match_device(struct usb_device *dev, const struct usb_device_id *id) return 1; } +EXPORT_SYMBOL_GPL(usb_match_device); /* returns 0 if no match, 1 if match */ int usb_match_one_id_intf(struct usb_device *dev, @@ -1885,3 +1886,4 @@ struct bus_type usb_bus_type = { .match = usb_device_match, .uevent = usb_uevent, }; +EXPORT_SYMBOL_GPL(usb_bus_type); From ef5b99e520dfa4197b3f246aa480a813c9af1d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Mon, 27 Jun 2016 00:16:16 +0200 Subject: [PATCH 3/3] pinmux-helper: add missing gpio_pu & gpio_pd modes for P8_18_pinmux --- arch/arm/boot/dts/am335x-bone-common-universal.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-bone-common-universal.dtsi b/arch/arm/boot/dts/am335x-bone-common-universal.dtsi index 781e33fe3d269..92c84d701ed6a 100644 --- a/arch/arm/boot/dts/am335x-bone-common-universal.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common-universal.dtsi @@ -1077,7 +1077,7 @@ P8_18_pinmux { compatible = "bone-pinmux-helper"; status = "okay"; - pinctrl-names = "default", "gpio"; + pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd"; pinctrl-0 = <&P8_18_default_pin>; pinctrl-1 = <&P8_18_gpio_pin>; pinctrl-2 = <&P8_18_gpio_pu_pin>;