diff options
author | Tony Jones <tonyj@suse.de> | 2007-10-16 04:27:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:10 -0400 |
commit | 49dce689ad4ef0fd1f970ef762168e4bd46f69a3 (patch) | |
tree | e9e6d07c704118d82a638ae1f01a7ef5b59dd68b /include/linux/spi/spi.h | |
parent | cd58310d775fc10cc820b27c10f619187b8c4133 (diff) |
spi doesn't need class_device
Make the SPI framework and drivers stop using class_device. Update docs
accordingly ... highlighting just which sysfs paths should be
"safe"/stable.
Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r-- | include/linux/spi/spi.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 002a3cddbdd5..387e428f1cdf 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -195,7 +195,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
195 | 195 | ||
196 | /** | 196 | /** |
197 | * struct spi_master - interface to SPI master controller | 197 | * struct spi_master - interface to SPI master controller |
198 | * @cdev: class interface to this driver | 198 | * @dev: device interface to this driver |
199 | * @bus_num: board-specific (and often SOC-specific) identifier for a | 199 | * @bus_num: board-specific (and often SOC-specific) identifier for a |
200 | * given SPI controller. | 200 | * given SPI controller. |
201 | * @num_chipselect: chipselects are used to distinguish individual | 201 | * @num_chipselect: chipselects are used to distinguish individual |
@@ -222,7 +222,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
222 | * message's completion function when the transaction completes. | 222 | * message's completion function when the transaction completes. |
223 | */ | 223 | */ |
224 | struct spi_master { | 224 | struct spi_master { |
225 | struct class_device cdev; | 225 | struct device dev; |
226 | 226 | ||
227 | /* other than negative (== assign one dynamically), bus_num is fully | 227 | /* other than negative (== assign one dynamically), bus_num is fully |
228 | * board-specific. usually that simplifies to being SOC-specific. | 228 | * board-specific. usually that simplifies to being SOC-specific. |
@@ -268,17 +268,17 @@ struct spi_master { | |||
268 | 268 | ||
269 | static inline void *spi_master_get_devdata(struct spi_master *master) | 269 | static inline void *spi_master_get_devdata(struct spi_master *master) |
270 | { | 270 | { |
271 | return class_get_devdata(&master->cdev); | 271 | return dev_get_drvdata(&master->dev); |
272 | } | 272 | } |
273 | 273 | ||
274 | static inline void spi_master_set_devdata(struct spi_master *master, void *data) | 274 | static inline void spi_master_set_devdata(struct spi_master *master, void *data) |
275 | { | 275 | { |
276 | class_set_devdata(&master->cdev, data); | 276 | dev_set_drvdata(&master->dev, data); |
277 | } | 277 | } |
278 | 278 | ||
279 | static inline struct spi_master *spi_master_get(struct spi_master *master) | 279 | static inline struct spi_master *spi_master_get(struct spi_master *master) |
280 | { | 280 | { |
281 | if (!master || !class_device_get(&master->cdev)) | 281 | if (!master || !get_device(&master->dev)) |
282 | return NULL; | 282 | return NULL; |
283 | return master; | 283 | return master; |
284 | } | 284 | } |
@@ -286,7 +286,7 @@ static inline struct spi_master *spi_master_get(struct spi_master *master) | |||
286 | static inline void spi_master_put(struct spi_master *master) | 286 | static inline void spi_master_put(struct spi_master *master) |
287 | { | 287 | { |
288 | if (master) | 288 | if (master) |
289 | class_device_put(&master->cdev); | 289 | put_device(&master->dev); |
290 | } | 290 | } |
291 | 291 | ||
292 | 292 | ||