* [RESEND PATCH] spmi: Include OF based modalias in device uevent
@ 2017-06-29 21:46 Bjorn Andersson
2017-06-29 23:05 ` Rob Clark
0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Andersson @ 2017-06-29 21:46 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Stephen Boyd, Rob Clark, linux-kernel, linux-arm-msm
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: Rob Clark <robdclark@gmail.com>
Reported-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
Resend to collect Rob's T-b and Stephen's R-b, and add Greg as recipient.
drivers/spmi/spmi.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
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,
};
/**
--
2.12.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RESEND PATCH] spmi: Include OF based modalias in device uevent
2017-06-29 21:46 [RESEND PATCH] spmi: Include OF based modalias in device uevent Bjorn Andersson
@ 2017-06-29 23:05 ` Rob Clark
0 siblings, 0 replies; 2+ messages in thread
From: Rob Clark @ 2017-06-29 23:05 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Greg Kroah-Hartman, Stephen Boyd, Linux Kernel Mailing List,
linux-arm-msm
On Thu, Jun 29, 2017 at 5:46 PM, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
> 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: Rob Clark <robdclark@gmail.com>
> Reported-by: Rob Clark <robdclark@gmail.com>
> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
And probably make sense to:
Cc: <stable@vger.kernel.org>
> ---
>
> Resend to collect Rob's T-b and Stephen's R-b, and add Greg as recipient.
>
> drivers/spmi/spmi.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> 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,
> };
>
> /**
> --
> 2.12.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-29 23:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 21:46 [RESEND PATCH] spmi: Include OF based modalias in device uevent Bjorn Andersson
2017-06-29 23:05 ` Rob Clark
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®