diff options
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 | ||