serial: Remove unnecessary amba_set_drvdata()
authorMichal Simek <michal.simek@xilinx.com>
Thu, 3 Oct 2013 09:46:28 +0000 (11:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Oct 2013 23:09:47 +0000 (16:09 -0700)
Driver core clears the driver data to NULL after device_release
or on probe failure, so just remove it from here.

Driver core change:
"device-core: Ensure drvdata = NULL when no driver is bound"
(sha1: 0998d0631001288a5974afc0b2a5f568bcdecb4d)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl010.c
drivers/tty/serial/amba-pl011.c

index 8b90f0b6dfdfe7838c43863350d93f9fccc41dae..33bd8606be6272d93f82e8aa6279cc00f6da87f0 100644 (file)
@@ -728,7 +728,6 @@ static int pl010_probe(struct amba_device *dev, const struct amba_id *id)
        amba_set_drvdata(dev, uap);
        ret = uart_add_one_port(&amba_reg, &uap->port);
        if (ret) {
-               amba_set_drvdata(dev, NULL);
                amba_ports[i] = NULL;
                clk_put(uap->clk);
  unmap:
@@ -745,8 +744,6 @@ static int pl010_remove(struct amba_device *dev)
        struct uart_amba_port *uap = amba_get_drvdata(dev);
        int i;
 
-       amba_set_drvdata(dev, NULL);
-
        uart_remove_one_port(&amba_reg, &uap->port);
 
        for (i = 0; i < ARRAY_SIZE(amba_ports); i++)
index aaa22867e656dc60a65e4249ff231b76fb907c83..7203864992a523509ee0f0f42f47c36714a886aa 100644 (file)
@@ -2147,7 +2147,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
        amba_set_drvdata(dev, uap);
        ret = uart_add_one_port(&amba_reg, &uap->port);
        if (ret) {
-               amba_set_drvdata(dev, NULL);
                amba_ports[i] = NULL;
                pl011_dma_remove(uap);
        }
@@ -2160,8 +2159,6 @@ static int pl011_remove(struct amba_device *dev)
        struct uart_amba_port *uap = amba_get_drvdata(dev);
        int i;
 
-       amba_set_drvdata(dev, NULL);
-
        uart_remove_one_port(&amba_reg, &uap->port);
 
        for (i = 0; i < ARRAY_SIZE(amba_ports); i++)