]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/i2c/busses/i2c-cpm.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[net-next-2.6.git] / drivers / i2c / busses / i2c-cpm.c
index e591de1bc7044260f0735731cf6b6981e3f075bc..f2de3be35df36265cdfca5d899097b161ef10171 100644 (file)
@@ -105,7 +105,7 @@ struct i2c_reg {
 
 struct cpm_i2c {
        char *base;
-       struct of_device *ofdev;
+       struct platform_device *ofdev;
        struct i2c_adapter adap;
        uint dp_addr;
        int version; /* CPM1=1, CPM2=2 */
@@ -428,7 +428,7 @@ static const struct i2c_adapter cpm_ops = {
 
 static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
 {
-       struct of_device *ofdev = cpm->ofdev;
+       struct platform_device *ofdev = cpm->ofdev;
        const u32 *data;
        int len, ret, i;
        void __iomem *i2c_base;
@@ -634,7 +634,7 @@ static void cpm_i2c_shutdown(struct cpm_i2c *cpm)
                cpm_muram_free(cpm->i2c_addr);
 }
 
-static int __devinit cpm_i2c_probe(struct of_device *ofdev,
+static int __devinit cpm_i2c_probe(struct platform_device *ofdev,
                         const struct of_device_id *match)
 {
        int result, len;
@@ -677,6 +677,11 @@ static int __devinit cpm_i2c_probe(struct of_device *ofdev,
        dev_dbg(&ofdev->dev, "hw routines for %s registered.\n",
                cpm->adap.name);
 
+       /*
+        * register OF I2C devices
+        */
+       of_i2c_register_devices(&cpm->adap);
+
        return 0;
 out_shut:
        cpm_i2c_shutdown(cpm);
@@ -687,7 +692,7 @@ out_free:
        return result;
 }
 
-static int __devexit cpm_i2c_remove(struct of_device *ofdev)
+static int __devexit cpm_i2c_remove(struct platform_device *ofdev)
 {
        struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev);