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:
@@ -883,7 +883,7 @@ static int sunsab_console_setup(struct console *con, char *options)
|
||||
printk("Console: ttyS%d (SAB82532)\n",
|
||||
(sunsab_reg.minor - 64) + con->index);
|
||||
|
||||
sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node);
|
||||
sunserial_console_termios(con, up->port.dev->of_node);
|
||||
|
||||
switch (con->cflag & CBAUD) {
|
||||
case B150: baud = 150; break;
|
||||
@@ -954,7 +954,7 @@ static inline struct console *SUNSAB_CONSOLE(void)
|
||||
#endif
|
||||
|
||||
static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
|
||||
struct of_device *op,
|
||||
struct platform_device *op,
|
||||
unsigned long offset,
|
||||
int line)
|
||||
{
|
||||
@@ -1006,7 +1006,7 @@ static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit sab_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit sab_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
static int inst;
|
||||
struct uart_sunsab_port *up;
|
||||
@@ -1062,7 +1062,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int __devexit sab_remove(struct of_device *op)
|
||||
static int __devexit sab_remove(struct platform_device *op)
|
||||
{
|
||||
struct uart_sunsab_port *up = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
Reference in New Issue
Block a user