aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2024-01-08 14:23:32 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2024-01-08 14:23:32 +1100
commitb2a03660db39e41126e7ee070ac2bcd32eb4312d (patch)
treed68a428e011515c1e7b117d12cfaba1af7a93b05
parent5b143b431d9da4d0d72370a56493ffd973356c0a (diff)
parentc52391fafcefe4c562bdac62088a2735c185b942 (diff)
downloadlinux-next-b2a03660db39e41126e7ee070ac2bcd32eb4312d.tar.gz
Merge branch 'auxdisplay' of https://github.com/ojeda/linux.git
-rw-r--r--drivers/auxdisplay/img-ascii-lcd.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c
index fa23e415f260ec..56efda0740fbc1 100644
--- a/drivers/auxdisplay/img-ascii-lcd.c
+++ b/drivers/auxdisplay/img-ascii-lcd.c
@@ -8,9 +8,9 @@
#include <linux/io.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
-#include <linux/of_address.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/slab.h>
@@ -225,17 +225,11 @@ MODULE_DEVICE_TABLE(of, img_ascii_lcd_matches);
*/
static int img_ascii_lcd_probe(struct platform_device *pdev)
{
- const struct of_device_id *match;
- const struct img_ascii_lcd_config *cfg;
struct device *dev = &pdev->dev;
+ const struct img_ascii_lcd_config *cfg = device_get_match_data(dev);
struct img_ascii_lcd_ctx *ctx;
int err;
- match = of_match_device(img_ascii_lcd_matches, dev);
- if (!match)
- return -ENODEV;
-
- cfg = match->data;
ctx = devm_kzalloc(dev, sizeof(*ctx) + cfg->num_chars, GFP_KERNEL);
if (!ctx)
return -ENOMEM;