mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
slimbus: core: add support to uevent
This patch adds support to uevent to help automatic module loading. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8f3d5fcde9
commit
9e663f4811
@@ -9,6 +9,7 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/idr.h>
|
#include <linux/idr.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
|
#include <linux/of_device.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/slimbus.h>
|
#include <linux/slimbus.h>
|
||||||
#include "slimbus.h"
|
#include "slimbus.h"
|
||||||
@@ -76,11 +77,24 @@ static int slim_device_remove(struct device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int slim_device_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||||
|
{
|
||||||
|
struct slim_device *sbdev = to_slim_device(dev);
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = of_device_uevent_modalias(dev, env);
|
||||||
|
if (ret != -ENODEV)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
return add_uevent_var(env, "MODALIAS=slim:%s", dev_name(&sbdev->dev));
|
||||||
|
}
|
||||||
|
|
||||||
struct bus_type slimbus_bus = {
|
struct bus_type slimbus_bus = {
|
||||||
.name = "slimbus",
|
.name = "slimbus",
|
||||||
.match = slim_device_match,
|
.match = slim_device_match,
|
||||||
.probe = slim_device_probe,
|
.probe = slim_device_probe,
|
||||||
.remove = slim_device_remove,
|
.remove = slim_device_remove,
|
||||||
|
.uevent = slim_device_uevent,
|
||||||
};
|
};
|
||||||
EXPORT_SYMBOL_GPL(slimbus_bus);
|
EXPORT_SYMBOL_GPL(slimbus_bus);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user