diff options
Diffstat (limited to 'drivers/base/component.c')
-rw-r--r-- | drivers/base/component.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/base/component.c b/drivers/base/component.c index 532a3a5d8f63..c7879f5ae2fb 100644 --- a/drivers/base/component.c +++ b/drivers/base/component.c @@ -11,7 +11,6 @@ #include <linux/device.h> #include <linux/kref.h> #include <linux/list.h> -#include <linux/module.h> #include <linux/mutex.h> #include <linux/slab.h> #include <linux/debugfs.h> @@ -102,11 +101,11 @@ static int component_devices_show(struct seq_file *s, void *data) seq_printf(s, "%-40s %20s\n", "device name", "status"); seq_puts(s, "-------------------------------------------------------------\n"); for (i = 0; i < match->num; i++) { - struct device *d = (struct device *)match->compare[i].data; + struct component *component = match->compare[i].component; - seq_printf(s, "%-40s %20s\n", dev_name(d), - match->compare[i].component ? - "registered" : "not registered"); + seq_printf(s, "%-40s %20s\n", + component ? dev_name(component->dev) : "(unknown)", + component ? (component->bound ? "bound" : "not bound") : "not registered"); } mutex_unlock(&component_mutex); @@ -775,5 +774,3 @@ void component_del(struct device *dev, const struct component_ops *ops) kfree(component); } EXPORT_SYMBOL_GPL(component_del); - -MODULE_LICENSE("GPL v2"); |