Commit 28b84b87 authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Kleber Sacilotto de Souza

spmi: Include OF based modalias in device uevent

BugLink: http://bugs.launchpad.net/bugs/1707233

commit d50daa2a upstream.

Include the OF-based modalias in the uevent sent when registering SPMI
devices, so that user space has a chance to autoload the kernel module
for the device.
Tested-by: default avatarRob Clark <robdclark@gmail.com>
Reported-by: default avatarRob Clark <robdclark@gmail.com>
Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent a4f39e1e
......@@ -364,11 +364,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,
};
/**
......
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