diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-02-22 23:05:51 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-02-28 15:22:44 -0500 |
commit | 74888760d40b3ac9054f9c5fa07b566c0676ba2d (patch) | |
tree | ede65e8b5ad746ce6c04cbe77ceb5bbf6a6dc6fd /drivers/net/sunhme.c | |
parent | f07eb223a081b278be02a58394cb5fd66f1a1bbd (diff) |
dt/net: Eliminate users of of_platform_{,un}register_driver
Get rid of users of of_platform_driver in drivers/net. 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/net/sunhme.c')
-rw-r--r-- | drivers/net/sunhme.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 55bbb9c15d96..eb4f59fb01e9 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -3237,11 +3237,15 @@ static void happy_meal_pci_exit(void) | |||
3237 | #endif | 3237 | #endif |
3238 | 3238 | ||
3239 | #ifdef CONFIG_SBUS | 3239 | #ifdef CONFIG_SBUS |
3240 | static int __devinit hme_sbus_probe(struct platform_device *op, const struct of_device_id *match) | 3240 | static int __devinit hme_sbus_probe(struct platform_device *op) |
3241 | { | 3241 | { |
3242 | struct device_node *dp = op->dev.of_node; | 3242 | struct device_node *dp = op->dev.of_node; |
3243 | const char *model = of_get_property(dp, "model", NULL); | 3243 | const char *model = of_get_property(dp, "model", NULL); |
3244 | int is_qfe = (match->data != NULL); | 3244 | int is_qfe; |
3245 | |||
3246 | if (!op->dev.of_match) | ||
3247 | return -EINVAL; | ||
3248 | is_qfe = (op->dev.of_match->data != NULL); | ||
3245 | 3249 | ||
3246 | if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe")) | 3250 | if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe")) |
3247 | is_qfe = 1; | 3251 | is_qfe = 1; |
@@ -3292,7 +3296,7 @@ static const struct of_device_id hme_sbus_match[] = { | |||
3292 | 3296 | ||
3293 | MODULE_DEVICE_TABLE(of, hme_sbus_match); | 3297 | MODULE_DEVICE_TABLE(of, hme_sbus_match); |
3294 | 3298 | ||
3295 | static struct of_platform_driver hme_sbus_driver = { | 3299 | static struct platform_driver hme_sbus_driver = { |
3296 | .driver = { | 3300 | .driver = { |
3297 | .name = "hme", | 3301 | .name = "hme", |
3298 | .owner = THIS_MODULE, | 3302 | .owner = THIS_MODULE, |
@@ -3306,7 +3310,7 @@ static int __init happy_meal_sbus_init(void) | |||
3306 | { | 3310 | { |
3307 | int err; | 3311 | int err; |
3308 | 3312 | ||
3309 | err = of_register_platform_driver(&hme_sbus_driver); | 3313 | err = platform_driver_register(&hme_sbus_driver); |
3310 | if (!err) | 3314 | if (!err) |
3311 | err = quattro_sbus_register_irqs(); | 3315 | err = quattro_sbus_register_irqs(); |
3312 | 3316 | ||
@@ -3315,7 +3319,7 @@ static int __init happy_meal_sbus_init(void) | |||
3315 | 3319 | ||
3316 | static void happy_meal_sbus_exit(void) | 3320 | static void happy_meal_sbus_exit(void) |
3317 | { | 3321 | { |
3318 | of_unregister_platform_driver(&hme_sbus_driver); | 3322 | platform_driver_unregister(&hme_sbus_driver); |
3319 | quattro_sbus_free_irqs(); | 3323 | quattro_sbus_free_irqs(); |
3320 | 3324 | ||
3321 | while (qfe_sbus_list) { | 3325 | while (qfe_sbus_list) { |