]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/spi/spi.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25
[linux-2.6-omap-h63xx.git] / include / linux / spi / spi.h
index 002a3cddbdd5b0bede9f6ba9f653623801bc8742..387e428f1cdf233ab3b54b078ba34b20157b2e37 100644 (file)
@@ -195,7 +195,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
 
 /**
  * struct spi_master - interface to SPI master controller
- * @cdev: class interface to this driver
+ * @dev: device interface to this driver
  * @bus_num: board-specific (and often SOC-specific) identifier for a
  *     given SPI controller.
  * @num_chipselect: chipselects are used to distinguish individual
@@ -222,7 +222,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
  * message's completion function when the transaction completes.
  */
 struct spi_master {
-       struct class_device     cdev;
+       struct device   dev;
 
        /* other than negative (== assign one dynamically), bus_num is fully
         * board-specific.  usually that simplifies to being SOC-specific.
@@ -268,17 +268,17 @@ struct spi_master {
 
 static inline void *spi_master_get_devdata(struct spi_master *master)
 {
-       return class_get_devdata(&master->cdev);
+       return dev_get_drvdata(&master->dev);
 }
 
 static inline void spi_master_set_devdata(struct spi_master *master, void *data)
 {
-       class_set_devdata(&master->cdev, data);
+       dev_set_drvdata(&master->dev, data);
 }
 
 static inline struct spi_master *spi_master_get(struct spi_master *master)
 {
-       if (!master || !class_device_get(&master->cdev))
+       if (!master || !get_device(&master->dev))
                return NULL;
        return master;
 }
@@ -286,7 +286,7 @@ static inline struct spi_master *spi_master_get(struct spi_master *master)
 static inline void spi_master_put(struct spi_master *master)
 {
        if (master)
-               class_device_put(&master->cdev);
+               put_device(&master->dev);
 }