Commit 5703d6ae authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Sam Ravnborg

drm/tiny/st7735r: Make driver OF-independent

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@tronnes.org>
Cc: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarDavid Lechner <david@lechnology.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200131204923.48928-3-andriy.shevchenko@linux.intel.com
parent f6ab3402
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/dma-buf.h> #include <linux/dma-buf.h>
#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of_device.h>
#include <linux/property.h> #include <linux/property.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <video/mipi_display.h> #include <video/mipi_display.h>
...@@ -192,7 +191,7 @@ static int st7735r_probe(struct spi_device *spi) ...@@ -192,7 +191,7 @@ static int st7735r_probe(struct spi_device *spi)
u32 rotation = 0; u32 rotation = 0;
int ret; int ret;
cfg = of_device_get_match_data(&spi->dev); cfg = device_get_match_data(&spi->dev);
if (!cfg) if (!cfg)
cfg = (void *)spi_get_device_id(spi)->driver_data; cfg = (void *)spi_get_device_id(spi)->driver_data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment