The driver core clears the driver data to NULL after device_release
or on probe failure.

Signed-off-by: Nizam Haider <[email protected]>
---
 drivers/staging/fbtft/fbtft-core.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c 
b/drivers/staging/fbtft/fbtft-core.c
index b1e4516..6824d5f 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -989,8 +989,6 @@ reg_fail:
                par->fbtftops.unregister_backlight(par);
        if (spi)
                spi_set_drvdata(spi, NULL);
-       if (par->pdev)
-               platform_set_drvdata(par->pdev, NULL);
 
        return ret;
 }
@@ -1012,8 +1010,6 @@ int fbtft_unregister_framebuffer(struct fb_info *fb_info)
 
        if (spi)
                spi_set_drvdata(spi, NULL);
-       if (par->pdev)
-               platform_set_drvdata(par->pdev, NULL);
        if (par->fbtftops.unregister_backlight)
                par->fbtftops.unregister_backlight(par);
        fbtft_sysfs_exit(par);
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to