]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/spmi/spmi.c
spmi: Include OF based modalias in device uevent
[karo-tx-linux.git] / drivers / spmi / spmi.c
index 2b9b0941d9eb5f82e917978426290a9d39b5c5cd..6d23226e5f696ee2268073efbe899bdfea88ba8a 100644 (file)
@@ -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,
 };
 
 /**