aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-08-06 11:25:50 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-08-06 11:25:50 -0400
commit2dc11581376829303b98eadb2de253bee065a56a (patch)
treedbce62559c822cd720d1819a50c488bfecdfa945 /drivers/net/ehea
parentfc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff)
of/device: Replace struct of_device with struct platform_device
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ehea')
-rw-r--r--drivers/net/ehea/ehea.h4
-rw-r--r--drivers/net/ehea/ehea_main.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index 0060e422f17..99a929964e3 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -413,7 +413,7 @@ struct ehea_port_res {
413 413
414struct ehea_adapter { 414struct ehea_adapter {
415 u64 handle; 415 u64 handle;
416 struct of_device *ofdev; 416 struct platform_device *ofdev;
417 struct ehea_port *port[EHEA_MAX_PORTS]; 417 struct ehea_port *port[EHEA_MAX_PORTS];
418 struct ehea_eq *neq; /* notification event queue */ 418 struct ehea_eq *neq; /* notification event queue */
419 struct tasklet_struct neq_tasklet; 419 struct tasklet_struct neq_tasklet;
@@ -465,7 +465,7 @@ struct ehea_port {
465 struct net_device *netdev; 465 struct net_device *netdev;
466 struct net_device_stats stats; 466 struct net_device_stats stats;
467 struct ehea_port_res port_res[EHEA_MAX_PORT_RES]; 467 struct ehea_port_res port_res[EHEA_MAX_PORT_RES];
468 struct of_device ofdev; /* Open Firmware Device */ 468 struct platform_device ofdev; /* Open Firmware Device */
469 struct ehea_mc_list *mc_list; /* Multicast MAC addresses */ 469 struct ehea_mc_list *mc_list; /* Multicast MAC addresses */
470 struct vlan_group *vgrp; 470 struct vlan_group *vgrp;
471 struct ehea_eq *qp_eq; 471 struct ehea_eq *qp_eq;
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 3beba70b7de..897719b49f9 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -107,10 +107,10 @@ struct ehea_fw_handle_array ehea_fw_handles;
107struct ehea_bcmc_reg_array ehea_bcmc_regs; 107struct ehea_bcmc_reg_array ehea_bcmc_regs;
108 108
109 109
110static int __devinit ehea_probe_adapter(struct of_device *dev, 110static int __devinit ehea_probe_adapter(struct platform_device *dev,
111 const struct of_device_id *id); 111 const struct of_device_id *id);
112 112
113static int __devexit ehea_remove(struct of_device *dev); 113static int __devexit ehea_remove(struct platform_device *dev);
114 114
115static struct of_device_id ehea_device_table[] = { 115static struct of_device_id ehea_device_table[] = {
116 { 116 {
@@ -3376,7 +3376,7 @@ static ssize_t ehea_remove_port(struct device *dev,
3376static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); 3376static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port);
3377static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); 3377static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port);
3378 3378
3379int ehea_create_device_sysfs(struct of_device *dev) 3379int ehea_create_device_sysfs(struct platform_device *dev)
3380{ 3380{
3381 int ret = device_create_file(&dev->dev, &dev_attr_probe_port); 3381 int ret = device_create_file(&dev->dev, &dev_attr_probe_port);
3382 if (ret) 3382 if (ret)
@@ -3387,13 +3387,13 @@ out:
3387 return ret; 3387 return ret;
3388} 3388}
3389 3389
3390void ehea_remove_device_sysfs(struct of_device *dev) 3390void ehea_remove_device_sysfs(struct platform_device *dev)
3391{ 3391{
3392 device_remove_file(&dev->dev, &dev_attr_probe_port); 3392 device_remove_file(&dev->dev, &dev_attr_probe_port);
3393 device_remove_file(&dev->dev, &dev_attr_remove_port); 3393 device_remove_file(&dev->dev, &dev_attr_remove_port);
3394} 3394}
3395 3395
3396static int __devinit ehea_probe_adapter(struct of_device *dev, 3396static int __devinit ehea_probe_adapter(struct platform_device *dev,
3397 const struct of_device_id *id) 3397 const struct of_device_id *id)
3398{ 3398{
3399 struct ehea_adapter *adapter; 3399 struct ehea_adapter *adapter;
@@ -3492,7 +3492,7 @@ out:
3492 return ret; 3492 return ret;
3493} 3493}
3494 3494
3495static int __devexit ehea_remove(struct of_device *dev) 3495static int __devexit ehea_remove(struct platform_device *dev)
3496{ 3496{
3497 struct ehea_adapter *adapter = dev_get_drvdata(&dev->dev); 3497 struct ehea_adapter *adapter = dev_get_drvdata(&dev->dev);
3498 int i; 3498 int i;