summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-08-27 17:25:16 +0200
committerHelge Deller <deller@gmx.de>2024-08-30 18:42:38 +0200
commitbd97615a331684590f6fe65420e9a959a57c975b (patch)
tree1949ee7b41e27ab1c4c9e4a4087b6e6639c06764 /drivers/video
parent077091721af00d2a9212218c2d61acbac5f47630 (diff)
fbdev: efifb: Use driver-private screen_info for sysfs
Since commit b9cfd1d271ab ("fbdev/efifb: Use screen_info pointer from device") efifb uses a local copy of screen_info and applies its modifications there. Adapt the sysfs attributes to also work with the custom copy instead of the unmodified platform data. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/efifb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
index ee71a65b361d..20517448487e 100644
--- a/drivers/video/fbdev/efifb.c
+++ b/drivers/video/fbdev/efifb.c
@@ -322,7 +322,7 @@ static ssize_t name##_show(struct device *dev, \
struct device_attribute *attr, \
char *buf) \
{ \
- struct screen_info *si = dev_get_platdata(dev); \
+ struct screen_info *si = dev_get_drvdata(dev); \
if (!si) \
return -ENODEV; \
return sprintf(buf, fmt "\n", (si->lfb_##name)); \
@@ -369,6 +369,8 @@ static int efifb_probe(struct platform_device *dev)
if (!si)
return -ENOMEM;
+ dev_set_drvdata(&dev->dev, si);
+
if (si->orig_video_isVGA != VIDEO_TYPE_EFI)
return -ENODEV;