diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2006-01-03 02:18:01 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-01-03 02:18:01 -0500 |
commit | 97f2aab6698f3ab2552c41c1024a65ffd0763a6d (patch) | |
tree | bb6e3b2949459f54f884c710fc74d40eef00d834 /drivers/i2c/busses/i2c-pxa.c | |
parent | d985c1088146607532093d9eaaaf99758f6a4d21 (diff) | |
parent | 88026842b0a760145aa71d69e74fbc9ec118ca44 (diff) |
drm: merge in Linus mainline
Diffstat (limited to 'drivers/i2c/busses/i2c-pxa.c')
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 67ccbea24ba4..70f7ab829d36 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -936,10 +936,10 @@ static struct pxa_i2c i2c_pxa = { | |||
936 | }, | 936 | }, |
937 | }; | 937 | }; |
938 | 938 | ||
939 | static int i2c_pxa_probe(struct device *dev) | 939 | static int i2c_pxa_probe(struct platform_device *dev) |
940 | { | 940 | { |
941 | struct pxa_i2c *i2c = &i2c_pxa; | 941 | struct pxa_i2c *i2c = &i2c_pxa; |
942 | struct i2c_pxa_platform_data *plat = dev->platform_data; | 942 | struct i2c_pxa_platform_data *plat = dev->dev.platform_data; |
943 | int ret; | 943 | int ret; |
944 | 944 | ||
945 | #ifdef CONFIG_PXA27x | 945 | #ifdef CONFIG_PXA27x |
@@ -968,7 +968,7 @@ static int i2c_pxa_probe(struct device *dev) | |||
968 | i2c_pxa_reset(i2c); | 968 | i2c_pxa_reset(i2c); |
969 | 969 | ||
970 | i2c->adap.algo_data = i2c; | 970 | i2c->adap.algo_data = i2c; |
971 | i2c->adap.dev.parent = dev; | 971 | i2c->adap.dev.parent = &dev->dev; |
972 | 972 | ||
973 | ret = i2c_add_adapter(&i2c->adap); | 973 | ret = i2c_add_adapter(&i2c->adap); |
974 | if (ret < 0) { | 974 | if (ret < 0) { |
@@ -976,7 +976,7 @@ static int i2c_pxa_probe(struct device *dev) | |||
976 | goto err_irq; | 976 | goto err_irq; |
977 | } | 977 | } |
978 | 978 | ||
979 | dev_set_drvdata(dev, i2c); | 979 | platform_set_drvdata(dev, i2c); |
980 | 980 | ||
981 | #ifdef CONFIG_I2C_PXA_SLAVE | 981 | #ifdef CONFIG_I2C_PXA_SLAVE |
982 | printk(KERN_INFO "I2C: %s: PXA I2C adapter, slave address %d\n", | 982 | printk(KERN_INFO "I2C: %s: PXA I2C adapter, slave address %d\n", |
@@ -993,11 +993,11 @@ static int i2c_pxa_probe(struct device *dev) | |||
993 | return ret; | 993 | return ret; |
994 | } | 994 | } |
995 | 995 | ||
996 | static int i2c_pxa_remove(struct device *dev) | 996 | static int i2c_pxa_remove(struct platform_device *dev) |
997 | { | 997 | { |
998 | struct pxa_i2c *i2c = dev_get_drvdata(dev); | 998 | struct pxa_i2c *i2c = platform_get_drvdata(dev); |
999 | 999 | ||
1000 | dev_set_drvdata(dev, NULL); | 1000 | platform_set_drvdata(dev, NULL); |
1001 | 1001 | ||
1002 | i2c_del_adapter(&i2c->adap); | 1002 | i2c_del_adapter(&i2c->adap); |
1003 | free_irq(IRQ_I2C, i2c); | 1003 | free_irq(IRQ_I2C, i2c); |
@@ -1006,21 +1006,22 @@ static int i2c_pxa_remove(struct device *dev) | |||
1006 | return 0; | 1006 | return 0; |
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | static struct device_driver i2c_pxa_driver = { | 1009 | static struct platform_driver i2c_pxa_driver = { |
1010 | .name = "pxa2xx-i2c", | ||
1011 | .bus = &platform_bus_type, | ||
1012 | .probe = i2c_pxa_probe, | 1010 | .probe = i2c_pxa_probe, |
1013 | .remove = i2c_pxa_remove, | 1011 | .remove = i2c_pxa_remove, |
1012 | .driver = { | ||
1013 | .name = "pxa2xx-i2c", | ||
1014 | }, | ||
1014 | }; | 1015 | }; |
1015 | 1016 | ||
1016 | static int __init i2c_adap_pxa_init(void) | 1017 | static int __init i2c_adap_pxa_init(void) |
1017 | { | 1018 | { |
1018 | return driver_register(&i2c_pxa_driver); | 1019 | return platform_driver_register(&i2c_pxa_driver); |
1019 | } | 1020 | } |
1020 | 1021 | ||
1021 | static void i2c_adap_pxa_exit(void) | 1022 | static void i2c_adap_pxa_exit(void) |
1022 | { | 1023 | { |
1023 | return driver_unregister(&i2c_pxa_driver); | 1024 | return platform_driver_unregister(&i2c_pxa_driver); |
1024 | } | 1025 | } |
1025 | 1026 | ||
1026 | module_init(i2c_adap_pxa_init); | 1027 | module_init(i2c_adap_pxa_init); |