Skip to content

Commit 5703d6a

Browse files
andy-shevsravnborg
authored andcommitted
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 <[email protected]> Cc: [email protected] Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Sam Ravnborg <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: David Lechner <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f6ab340 commit 5703d6a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/tiny/st7735r.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <linux/dma-buf.h>
1313
#include <linux/gpio/consumer.h>
1414
#include <linux/module.h>
15-
#include <linux/of_device.h>
1615
#include <linux/property.h>
1716
#include <linux/spi/spi.h>
1817
#include <video/mipi_display.h>
@@ -192,7 +191,7 @@ static int st7735r_probe(struct spi_device *spi)
192191
u32 rotation = 0;
193192
int ret;
194193

195-
cfg = of_device_get_match_data(&spi->dev);
194+
cfg = device_get_match_data(&spi->dev);
196195
if (!cfg)
197196
cfg = (void *)spi_get_device_id(spi)->driver_data;
198197

0 commit comments

Comments
 (0)