mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 09:34:12 +08:00
fbdev: efifb: Use driver-private screen_info for sysfs
Since commit b9cfd1d271
("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>
This commit is contained in:
parent
077091721a
commit
bd97615a33
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user