Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -19
+1 -19
drivers/hsi/hsi.c
··· 29 29 #include <linux/string.h> 30 30 #include "hsi_core.h" 31 31 32 - static struct device_type hsi_ctrl = { 33 - .name = "hsi_controller", 34 - }; 35 - 36 - static struct device_type hsi_cl = { 37 - .name = "hsi_client", 38 - }; 39 - 40 - static struct device_type hsi_port = { 41 - .name = "hsi_port", 42 - }; 43 - 44 32 static ssize_t modalias_show(struct device *dev, 45 33 struct device_attribute *a __maybe_unused, char *buf) 46 34 { ··· 42 54 43 55 static int hsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env) 44 56 { 45 - if (dev->type == &hsi_cl) 46 - add_uevent_var(env, "MODALIAS=hsi:%s", dev_name(dev)); 57 + add_uevent_var(env, "MODALIAS=hsi:%s", dev_name(dev)); 47 58 48 59 return 0; 49 60 } ··· 72 85 cl = kzalloc(sizeof(*cl), GFP_KERNEL); 73 86 if (!cl) 74 87 return; 75 - cl->device.type = &hsi_cl; 76 88 cl->tx_cfg = info->tx_cfg; 77 89 cl->rx_cfg = info->rx_cfg; 78 90 cl->device.bus = &hsi_bus_type; ··· 161 175 unsigned int i; 162 176 int err; 163 177 164 - hsi->device.type = &hsi_ctrl; 165 - hsi->device.bus = &hsi_bus_type; 166 178 err = device_add(&hsi->device); 167 179 if (err < 0) 168 180 return err; 169 181 for (i = 0; i < hsi->num_ports; i++) { 170 182 hsi->port[i]->device.parent = &hsi->device; 171 - hsi->port[i]->device.bus = &hsi_bus_type; 172 - hsi->port[i]->device.type = &hsi_port; 173 183 err = device_add(&hsi->port[i]->device); 174 184 if (err < 0) 175 185 goto out;