diff options
Diffstat (limited to 'drivers/base/transport_class.c')
-rw-r--r-- | drivers/base/transport_class.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/base/transport_class.c b/drivers/base/transport_class.c index 6c2b447a3336..f25e7c6b2d27 100644 --- a/drivers/base/transport_class.c +++ b/drivers/base/transport_class.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * This file is licensed under GPLv2 | 7 | * This file is licensed under GPLv2 |
8 | * | 8 | * |
9 | * The basic idea here is to allow any "device controller" (which | 9 | * The basic idea here is to allow any "device controller" (which |
10 | * would most often be a Host Bus Adapter" to use the services of one | 10 | * would most often be a Host Bus Adapter to use the services of one |
11 | * or more tranport classes for performing transport specific | 11 | * or more tranport classes for performing transport specific |
12 | * services. Transport specific services are things that the generic | 12 | * services. Transport specific services are things that the generic |
13 | * command layer doesn't want to know about (speed settings, line | 13 | * command layer doesn't want to know about (speed settings, line |
@@ -64,7 +64,9 @@ void transport_class_unregister(struct transport_class *tclass) | |||
64 | } | 64 | } |
65 | EXPORT_SYMBOL_GPL(transport_class_unregister); | 65 | EXPORT_SYMBOL_GPL(transport_class_unregister); |
66 | 66 | ||
67 | static int anon_transport_dummy_function(struct device *dev) | 67 | static int anon_transport_dummy_function(struct transport_container *tc, |
68 | struct device *dev, | ||
69 | struct class_device *cdev) | ||
68 | { | 70 | { |
69 | /* do nothing */ | 71 | /* do nothing */ |
70 | return 0; | 72 | return 0; |
@@ -115,9 +117,10 @@ static int transport_setup_classdev(struct attribute_container *cont, | |||
115 | struct class_device *classdev) | 117 | struct class_device *classdev) |
116 | { | 118 | { |
117 | struct transport_class *tclass = class_to_transport_class(cont->class); | 119 | struct transport_class *tclass = class_to_transport_class(cont->class); |
120 | struct transport_container *tcont = attribute_container_to_transport_container(cont); | ||
118 | 121 | ||
119 | if (tclass->setup) | 122 | if (tclass->setup) |
120 | tclass->setup(dev); | 123 | tclass->setup(tcont, dev, classdev); |
121 | 124 | ||
122 | return 0; | 125 | return 0; |
123 | } | 126 | } |
@@ -178,12 +181,14 @@ void transport_add_device(struct device *dev) | |||
178 | EXPORT_SYMBOL_GPL(transport_add_device); | 181 | EXPORT_SYMBOL_GPL(transport_add_device); |
179 | 182 | ||
180 | static int transport_configure(struct attribute_container *cont, | 183 | static int transport_configure(struct attribute_container *cont, |
181 | struct device *dev) | 184 | struct device *dev, |
185 | struct class_device *cdev) | ||
182 | { | 186 | { |
183 | struct transport_class *tclass = class_to_transport_class(cont->class); | 187 | struct transport_class *tclass = class_to_transport_class(cont->class); |
188 | struct transport_container *tcont = attribute_container_to_transport_container(cont); | ||
184 | 189 | ||
185 | if (tclass->configure) | 190 | if (tclass->configure) |
186 | tclass->configure(dev); | 191 | tclass->configure(tcont, dev, cdev); |
187 | 192 | ||
188 | return 0; | 193 | return 0; |
189 | } | 194 | } |
@@ -202,7 +207,7 @@ static int transport_configure(struct attribute_container *cont, | |||
202 | */ | 207 | */ |
203 | void transport_configure_device(struct device *dev) | 208 | void transport_configure_device(struct device *dev) |
204 | { | 209 | { |
205 | attribute_container_trigger(dev, transport_configure); | 210 | attribute_container_device_trigger(dev, transport_configure); |
206 | } | 211 | } |
207 | EXPORT_SYMBOL_GPL(transport_configure_device); | 212 | EXPORT_SYMBOL_GPL(transport_configure_device); |
208 | 213 | ||
@@ -215,7 +220,7 @@ static int transport_remove_classdev(struct attribute_container *cont, | |||
215 | struct transport_class *tclass = class_to_transport_class(cont->class); | 220 | struct transport_class *tclass = class_to_transport_class(cont->class); |
216 | 221 | ||
217 | if (tclass->remove) | 222 | if (tclass->remove) |
218 | tclass->remove(dev); | 223 | tclass->remove(tcont, dev, classdev); |
219 | 224 | ||
220 | if (tclass->remove != anon_transport_dummy_function) { | 225 | if (tclass->remove != anon_transport_dummy_function) { |
221 | if (tcont->statistics) | 226 | if (tcont->statistics) |