diff --git a/kernel.spec b/kernel.spec index 84aa0cff5..154121b44 100644 --- a/kernel.spec +++ b/kernel.spec @@ -557,7 +557,8 @@ Patch432: arm64-cavium-fixes.patch Patch433: arm64-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch # https://patchwork.kernel.org/patch/9815555/ -Patch434: rpmsg-Make-modalias-work-for-DeviceTree-based-devices.patch +# https://patchwork.kernel.org/patch/9815651/ +Patch434: qcom-rmsg-spmi-fixes.patch # http://www.spinics.net/lists/devicetree/msg163238.html Patch440: bcm2837-initial-support.patch diff --git a/rpmsg-Make-modalias-work-for-DeviceTree-based-devices.patch b/qcom-rmsg-spmi-fixes.patch similarity index 76% rename from rpmsg-Make-modalias-work-for-DeviceTree-based-devices.patch rename to qcom-rmsg-spmi-fixes.patch index 6d46c9ffe..7aa1ca18c 100644 --- a/rpmsg-Make-modalias-work-for-DeviceTree-based-devices.patch +++ b/qcom-rmsg-spmi-fixes.patch @@ -55,3 +55,31 @@ index ad3d2a9df287..067650c5bcb6 100644 return add_uevent_var(env, "MODALIAS=" RPMSG_DEVICE_MODALIAS_FMT, rpdev->id.name); +diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c +index 2b9b0941d9eb..6d23226e5f69 100644 +--- a/drivers/spmi/spmi.c ++++ b/drivers/spmi/spmi.c +@@ -365,11 +365,23 @@ static int spmi_drv_remove(struct device *dev) + return 0; + } + ++static int spmi_drv_uevent(struct device *dev, struct kobj_uevent_env *env) ++{ ++ int ret; ++ ++ ret = of_device_uevent_modalias(dev, env); ++ if (ret != -ENODEV) ++ return ret; ++ ++ return 0; ++} ++ + static struct bus_type spmi_bus_type = { + .name = "spmi", + .match = spmi_device_match, + .probe = spmi_drv_probe, + .remove = spmi_drv_remove, ++ .uevent = spmi_drv_uevent, + }; + + /**