aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hsi/hsi.c
diff options
context:
space:
mode:
authorCarlos Chinea <carlos.chinea@nokia.com>2012-04-10 08:11:24 -0400
committerCarlos Chinea <carlos.chinea@nokia.com>2012-04-23 07:23:32 -0400
commit6f02b9e9b44a3bfc0046da3ff2707dae0b5e2f30 (patch)
tree350b12ed6499da8eae5c1656f3edbe2266d08b1f /drivers/hsi/hsi.c
parent90e41f9dc75b47ab94e2191e4c86aa8259699a33 (diff)
HSI: hsi: Remove controllers and ports from the bus
HSI controllers and ports do not belong to the HSI bus. Those devices are not supposed to have a driver attached to them. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/hsi/hsi.c')
-rw-r--r--drivers/hsi/hsi.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/hsi/hsi.c b/drivers/hsi/hsi.c
index 5c76a36419d4..cec1f0c04557 100644
--- a/drivers/hsi/hsi.c
+++ b/drivers/hsi/hsi.c
@@ -29,18 +29,6 @@
29#include <linux/string.h> 29#include <linux/string.h>
30#include "hsi_core.h" 30#include "hsi_core.h"
31 31
32static struct device_type hsi_ctrl = {
33 .name = "hsi_controller",
34};
35
36static struct device_type hsi_cl = {
37 .name = "hsi_client",
38};
39
40static struct device_type hsi_port = {
41 .name = "hsi_port",
42};
43
44static ssize_t modalias_show(struct device *dev, 32static ssize_t modalias_show(struct device *dev,
45 struct device_attribute *a __maybe_unused, char *buf) 33 struct device_attribute *a __maybe_unused, char *buf)
46{ 34{
@@ -54,8 +42,7 @@ static struct device_attribute hsi_bus_dev_attrs[] = {
54 42
55static int hsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env) 43static int hsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
56{ 44{
57 if (dev->type == &hsi_cl) 45 add_uevent_var(env, "MODALIAS=hsi:%s", dev_name(dev));
58 add_uevent_var(env, "MODALIAS=hsi:%s", dev_name(dev));
59 46
60 return 0; 47 return 0;
61} 48}
@@ -85,7 +72,6 @@ static void hsi_new_client(struct hsi_port *port, struct hsi_board_info *info)
85 cl = kzalloc(sizeof(*cl), GFP_KERNEL); 72 cl = kzalloc(sizeof(*cl), GFP_KERNEL);
86 if (!cl) 73 if (!cl)
87 return; 74 return;
88 cl->device.type = &hsi_cl;
89 cl->tx_cfg = info->tx_cfg; 75 cl->tx_cfg = info->tx_cfg;
90 cl->rx_cfg = info->rx_cfg; 76 cl->rx_cfg = info->rx_cfg;
91 cl->device.bus = &hsi_bus_type; 77 cl->device.bus = &hsi_bus_type;
@@ -175,15 +161,11 @@ int hsi_register_controller(struct hsi_controller *hsi)
175 unsigned int i; 161 unsigned int i;
176 int err; 162 int err;
177 163
178 hsi->device.type = &hsi_ctrl;
179 hsi->device.bus = &hsi_bus_type;
180 err = device_add(&hsi->device); 164 err = device_add(&hsi->device);
181 if (err < 0) 165 if (err < 0)
182 return err; 166 return err;
183 for (i = 0; i < hsi->num_ports; i++) { 167 for (i = 0; i < hsi->num_ports; i++) {
184 hsi->port[i]->device.parent = &hsi->device; 168 hsi->port[i]->device.parent = &hsi->device;
185 hsi->port[i]->device.bus = &hsi_bus_type;
186 hsi->port[i]->device.type = &hsi_port;
187 err = device_add(&hsi->port[i]->device); 169 err = device_add(&hsi->port[i]->device);
188 if (err < 0) 170 if (err < 0)
189 goto out; 171 goto out;