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>
This commit is contained in:
@ -689,7 +689,7 @@ static void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
|
||||
{
|
||||
const struct linux_prom_registers *regs;
|
||||
struct sunqe *qep = netdev_priv(dev);
|
||||
struct of_device *op;
|
||||
struct platform_device *op;
|
||||
|
||||
strcpy(info->driver, "sunqe");
|
||||
strcpy(info->version, "3.0");
|
||||
@ -720,7 +720,7 @@ static const struct ethtool_ops qe_ethtool_ops = {
|
||||
};
|
||||
|
||||
/* This is only called once at boot time for each card probed. */
|
||||
static void qec_init_once(struct sunqec *qecp, struct of_device *op)
|
||||
static void qec_init_once(struct sunqec *qecp, struct platform_device *op)
|
||||
{
|
||||
u8 bsizes = qecp->qec_bursts;
|
||||
|
||||
@ -770,9 +770,9 @@ static u8 __devinit qec_get_burst(struct device_node *dp)
|
||||
return bsizes;
|
||||
}
|
||||
|
||||
static struct sunqec * __devinit get_qec(struct of_device *child)
|
||||
static struct sunqec * __devinit get_qec(struct platform_device *child)
|
||||
{
|
||||
struct of_device *op = to_of_device(child->dev.parent);
|
||||
struct platform_device *op = to_platform_device(child->dev.parent);
|
||||
struct sunqec *qecp;
|
||||
|
||||
qecp = dev_get_drvdata(&op->dev);
|
||||
@ -836,7 +836,7 @@ static const struct net_device_ops qec_ops = {
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
};
|
||||
|
||||
static int __devinit qec_ether_init(struct of_device *op)
|
||||
static int __devinit qec_ether_init(struct platform_device *op)
|
||||
{
|
||||
static unsigned version_printed;
|
||||
struct net_device *dev;
|
||||
@ -941,12 +941,12 @@ fail:
|
||||
return res;
|
||||
}
|
||||
|
||||
static int __devinit qec_sbus_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit qec_sbus_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
return qec_ether_init(op);
|
||||
}
|
||||
|
||||
static int __devexit qec_sbus_remove(struct of_device *op)
|
||||
static int __devexit qec_sbus_remove(struct platform_device *op)
|
||||
{
|
||||
struct sunqe *qp = dev_get_drvdata(&op->dev);
|
||||
struct net_device *net_dev = qp->dev;
|
||||
@ -997,7 +997,7 @@ static void __exit qec_exit(void)
|
||||
|
||||
while (root_qec_dev) {
|
||||
struct sunqec *next = root_qec_dev->next_module;
|
||||
struct of_device *op = root_qec_dev->op;
|
||||
struct platform_device *op = root_qec_dev->op;
|
||||
|
||||
free_irq(op->archdata.irqs[0], (void *) root_qec_dev);
|
||||
of_iounmap(&op->resource[0], root_qec_dev->gregs,
|
||||
|
Reference in New Issue
Block a user