[PATCH 04/13] serial drivers: remove unused type_data

Sascha Hauer s.hauer at pengutronix.de
Sat Feb 25 10:51:01 EST 2012


Several serial drivers set the type_data field without ever using it,
so just remove it.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/serial/amba-pl011.c         |    1 -
 drivers/serial/arm_dcc.c            |    1 -
 drivers/serial/atmel.c              |    1 -
 drivers/serial/linux_console.c      |    1 -
 drivers/serial/serial_altera.c      |    1 -
 drivers/serial/serial_altera_jtag.c |    1 -
 drivers/serial/serial_blackfin.c    |    1 -
 drivers/serial/serial_mpc5xxx.c     |    3 +--
 drivers/serial/serial_netx.c        |    1 -
 drivers/serial/serial_ns16550.c     |    1 -
 drivers/serial/serial_pl010.c       |    1 -
 11 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index 56f6f15..f8c55c4 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -166,7 +166,6 @@ static int pl011_probe(struct device_d *dev)
 		return PTR_ERR(uart->clk);
 
 	cdev = &uart->uart;
-	dev->type_data = cdev;
 	cdev->dev = dev;
 	cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
 	cdev->tstc = pl011_tstc;
diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c
index e1066ab..70d397e 100644
--- a/drivers/serial/arm_dcc.c
+++ b/drivers/serial/arm_dcc.c
@@ -135,7 +135,6 @@ static int arm_dcc_probe(struct device_d *dev)
 	struct console_device *cdev;
 
 	cdev = &arm_dcc_dev;
-	dev->type_data = cdev;
 	cdev->dev = dev;
 	cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
 	cdev->tstc = arm_dcc_tstc;
diff --git a/drivers/serial/atmel.c b/drivers/serial/atmel.c
index de58465..32e6a8d 100644
--- a/drivers/serial/atmel.c
+++ b/drivers/serial/atmel.c
@@ -401,7 +401,6 @@ static int atmel_serial_probe(struct device_d *dev)
 
 	uart = xzalloc(sizeof(struct atmel_uart_port));
 	cdev = &uart->uart;
-	dev->type_data = cdev;
 	cdev->dev = dev;
 	cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
 	cdev->tstc = atmel_serial_tstc;
diff --git a/drivers/serial/linux_console.c b/drivers/serial/linux_console.c
index c792b50..a9081a7 100644
--- a/drivers/serial/linux_console.c
+++ b/drivers/serial/linux_console.c
@@ -66,7 +66,6 @@ static int linux_console_probe(struct device_d *dev)
 	struct linux_console_data *data = dev->platform_data;
 
 	cdev = xzalloc(sizeof(struct console_device));
-	dev->type_data = cdev;
 	cdev->dev = dev;
 	cdev->f_caps = data->flags;
 	cdev->tstc = linux_console_tstc;
diff --git a/drivers/serial/serial_altera.c b/drivers/serial/serial_altera.c
index e4d3c40..ee1b6bc 100644
--- a/drivers/serial/serial_altera.c
+++ b/drivers/serial/serial_altera.c
@@ -89,7 +89,6 @@ static int altera_serial_probe(struct device_d *dev)
 	cdev = &priv->cdev;
 
 	priv->regs = dev_request_mem_region(dev, 0);
-	dev->type_data = cdev;
 	cdev->dev = dev;
 	cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
 	cdev->tstc = altera_serial_tstc;
diff --git a/drivers/serial/serial_altera_jtag.c b/drivers/serial/serial_altera_jtag.c
index 140ca26..7edb5bd 100644
--- a/drivers/serial/serial_altera_jtag.c
+++ b/drivers/serial/serial_altera_jtag.c
@@ -94,7 +94,6 @@ static int altera_serial_jtag_probe(struct device_d *dev) {
 	cdev = &priv->cdev;
 
 	priv->regs = dev_request_mem_region(dev, 0);
-	dev->type_data = cdev;
 	cdev->dev = dev;
 	cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
 	cdev->tstc = altera_serial_jtag_tstc;
diff --git a/drivers/serial/serial_blackfin.c b/drivers/serial/serial_blackfin.c
index d38a06c..7830a61 100644
--- a/drivers/serial/serial_blackfin.c
+++ b/drivers/serial/serial_blackfin.c
@@ -116,7 +116,6 @@ static int blackfin_serial_probe(struct device_d *dev)
 	struct console_device *cdev;
 
 	cdev = xzalloc(sizeof(struct console_device));
-	dev->type_data = cdev;
 	cdev->dev = dev;
 	cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
 	cdev->tstc = blackfin_serial_tstc;
diff --git a/drivers/serial/serial_mpc5xxx.c b/drivers/serial/serial_mpc5xxx.c
index b00b442..cf9ce62 100644
--- a/drivers/serial/serial_mpc5xxx.c
+++ b/drivers/serial/serial_mpc5xxx.c
@@ -149,9 +149,8 @@ static int mpc5xxx_serial_tstc (struct console_device *cdev)
 static int mpc5xxx_serial_probe(struct device_d *dev)
 {
 	struct console_device *cdev;
-	
+
 	cdev = xzalloc(sizeof(struct console_device));
-	dev->type_data = cdev;
 	dev->priv = dev_request_mem_region(dev, 0);
 	cdev->dev = dev;
 	cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
diff --git a/drivers/serial/serial_netx.c b/drivers/serial/serial_netx.c
index 4f4fb2d..2d4ef11 100644
--- a/drivers/serial/serial_netx.c
+++ b/drivers/serial/serial_netx.c
@@ -141,7 +141,6 @@ static int netx_serial_probe(struct device_d *dev)
 	struct console_device *cdev;
 
 	cdev = xzalloc(sizeof(struct console_device));
-	dev->type_data = cdev;
 	dev->priv = dev_request_mem_region(dev, 0);
 	cdev->dev = dev;
 	cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 88ba836..820aac5 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -244,7 +244,6 @@ static int ns16550_probe(struct device_d *dev)
 
 	cdev = xzalloc(sizeof(*cdev));
 
-	dev->type_data = cdev;
 	cdev->dev = dev;
 	if (plat->f_caps)
 		cdev->f_caps = plat->f_caps;
diff --git a/drivers/serial/serial_pl010.c b/drivers/serial/serial_pl010.c
index e11406d..2c2b8c4 100644
--- a/drivers/serial/serial_pl010.c
+++ b/drivers/serial/serial_pl010.c
@@ -142,7 +142,6 @@ static int pl010_probe(struct device_d *dev)
 	struct console_device *cdev;
 
 	cdev = xzalloc(sizeof(struct console_device));
-	dev->type_data = cdev;
 	dev->priv = dev_request_mem_region(dev, 0);
 	cdev->dev = dev;
 	cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
-- 
1.7.9.1




More information about the barebox mailing list