diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-02-22 23:02:43 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-02-28 15:22:44 -0500 |
commit | 18d306d1375696b0e6b5b39e4744d7fa2ad5e170 (patch) | |
tree | 670eac5a75e3b6b0c76903da4d3cf6334d28fe5b /drivers/spi/spi_fsl_spi.c | |
parent | e5263a517688b83861d406223a0f111a6e4116ff (diff) |
dt/spi: Eliminate users of of_platform_{,un}register_driver
Get rid of users of of_platform_driver in drivers/spi. The
of_platform_{,un}register_driver functions are going away, so the
users need to be converted to using the platform_bus_type directly.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi/spi_fsl_spi.c')
-rw-r--r-- | drivers/spi/spi_fsl_spi.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/spi/spi_fsl_spi.c b/drivers/spi/spi_fsl_spi.c index 7ca52d3ae8f8..7963c9b49566 100644 --- a/drivers/spi/spi_fsl_spi.c +++ b/drivers/spi/spi_fsl_spi.c | |||
@@ -1042,8 +1042,7 @@ static int of_fsl_spi_free_chipselects(struct device *dev) | |||
1042 | return 0; | 1042 | return 0; |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | static int __devinit of_fsl_spi_probe(struct platform_device *ofdev, | 1045 | static int __devinit of_fsl_spi_probe(struct platform_device *ofdev) |
1046 | const struct of_device_id *ofid) | ||
1047 | { | 1046 | { |
1048 | struct device *dev = &ofdev->dev; | 1047 | struct device *dev = &ofdev->dev; |
1049 | struct device_node *np = ofdev->dev.of_node; | 1048 | struct device_node *np = ofdev->dev.of_node; |
@@ -1052,7 +1051,7 @@ static int __devinit of_fsl_spi_probe(struct platform_device *ofdev, | |||
1052 | struct resource irq; | 1051 | struct resource irq; |
1053 | int ret = -ENOMEM; | 1052 | int ret = -ENOMEM; |
1054 | 1053 | ||
1055 | ret = of_mpc8xxx_spi_probe(ofdev, ofid); | 1054 | ret = of_mpc8xxx_spi_probe(ofdev); |
1056 | if (ret) | 1055 | if (ret) |
1057 | return ret; | 1056 | return ret; |
1058 | 1057 | ||
@@ -1100,7 +1099,7 @@ static const struct of_device_id of_fsl_spi_match[] = { | |||
1100 | }; | 1099 | }; |
1101 | MODULE_DEVICE_TABLE(of, of_fsl_spi_match); | 1100 | MODULE_DEVICE_TABLE(of, of_fsl_spi_match); |
1102 | 1101 | ||
1103 | static struct of_platform_driver of_fsl_spi_driver = { | 1102 | static struct platform_driver of_fsl_spi_driver = { |
1104 | .driver = { | 1103 | .driver = { |
1105 | .name = "fsl_spi", | 1104 | .name = "fsl_spi", |
1106 | .owner = THIS_MODULE, | 1105 | .owner = THIS_MODULE, |
@@ -1177,13 +1176,13 @@ static void __exit legacy_driver_unregister(void) {} | |||
1177 | static int __init fsl_spi_init(void) | 1176 | static int __init fsl_spi_init(void) |
1178 | { | 1177 | { |
1179 | legacy_driver_register(); | 1178 | legacy_driver_register(); |
1180 | return of_register_platform_driver(&of_fsl_spi_driver); | 1179 | return platform_driver_register(&of_fsl_spi_driver); |
1181 | } | 1180 | } |
1182 | module_init(fsl_spi_init); | 1181 | module_init(fsl_spi_init); |
1183 | 1182 | ||
1184 | static void __exit fsl_spi_exit(void) | 1183 | static void __exit fsl_spi_exit(void) |
1185 | { | 1184 | { |
1186 | of_unregister_platform_driver(&of_fsl_spi_driver); | 1185 | platform_driver_unregister(&of_fsl_spi_driver); |
1187 | legacy_driver_unregister(); | 1186 | legacy_driver_unregister(); |
1188 | } | 1187 | } |
1189 | module_exit(fsl_spi_exit); | 1188 | module_exit(fsl_spi_exit); |