Skip to content

Commit 457e4f9

Browse files
committed
Merge tag 'auxdisplay-6.8' of https://github.com/ojeda/linux
Pull auxdisplay update from Miguel Ojeda: "A single cleanup for 'img-ascii-lcd' to use 'device_get_match_data()'" * tag 'auxdisplay-6.8' of https://github.com/ojeda/linux: auxdisplay: img-ascii-lcd: Use device_get_match_data()
2 parents 2518f39 + c52391f commit 457e4f9

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

drivers/auxdisplay/img-ascii-lcd.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#include <linux/io.h>
99
#include <linux/mfd/syscon.h>
1010
#include <linux/module.h>
11-
#include <linux/of_address.h>
12-
#include <linux/of_platform.h>
11+
#include <linux/of.h>
1312
#include <linux/platform_device.h>
13+
#include <linux/property.h>
1414
#include <linux/regmap.h>
1515
#include <linux/slab.h>
1616

@@ -225,17 +225,11 @@ MODULE_DEVICE_TABLE(of, img_ascii_lcd_matches);
225225
*/
226226
static int img_ascii_lcd_probe(struct platform_device *pdev)
227227
{
228-
const struct of_device_id *match;
229-
const struct img_ascii_lcd_config *cfg;
230228
struct device *dev = &pdev->dev;
229+
const struct img_ascii_lcd_config *cfg = device_get_match_data(dev);
231230
struct img_ascii_lcd_ctx *ctx;
232231
int err;
233232

234-
match = of_match_device(img_ascii_lcd_matches, dev);
235-
if (!match)
236-
return -ENODEV;
237-
238-
cfg = match->data;
239233
ctx = devm_kzalloc(dev, sizeof(*ctx) + cfg->num_chars, GFP_KERNEL);
240234
if (!ctx)
241235
return -ENOMEM;

0 commit comments

Comments
 (0)