[PATCH v2 3/4] drm/tiny/st7735r: Make driver OF-independent
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Fri Jan 31 20:49:26 UTC 2020
There is one OF call in the driver that limits its area of use.
Replace it to generic device_get_match_data() and get rid of OF dependency.
Cc: Noralf Trønnes <noralf at tronnes.org>
Cc: dri-devel at lists.freedesktop.org
Cc: David Airlie <airlied at linux.ie>
Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: Sam Ravnborg <sam at ravnborg.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Acked-by: David Lechner <david at lechnology.com>
---
v2: Add tag (David)
drivers/gpu/drm/tiny/st7735r.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tiny/st7735r.c b/drivers/gpu/drm/tiny/st7735r.c
index 32574f1b6071..a844cde6d14a 100644
--- a/drivers/gpu/drm/tiny/st7735r.c
+++ b/drivers/gpu/drm/tiny/st7735r.c
@@ -12,7 +12,6 @@
#include <linux/dma-buf.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
-#include <linux/of_device.h>
#include <linux/property.h>
#include <linux/spi/spi.h>
#include <video/mipi_display.h>
@@ -192,7 +191,7 @@ static int st7735r_probe(struct spi_device *spi)
u32 rotation = 0;
int ret;
- cfg = of_device_get_match_data(&spi->dev);
+ cfg = device_get_match_data(&spi->dev);
if (!cfg)
cfg = (void *)spi_get_device_id(spi)->driver_data;
--
2.24.1
More information about the dri-devel
mailing list