mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 14:05:39 +00: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, \
|
struct device_attribute *attr, \
|
||||||
char *buf) \
|
char *buf) \
|
||||||
{ \
|
{ \
|
||||||
struct screen_info *si = dev_get_platdata(dev); \
|
struct screen_info *si = dev_get_drvdata(dev); \
|
||||||
if (!si) \
|
if (!si) \
|
||||||
return -ENODEV; \
|
return -ENODEV; \
|
||||||
return sprintf(buf, fmt "\n", (si->lfb_##name)); \
|
return sprintf(buf, fmt "\n", (si->lfb_##name)); \
|
||||||
@ -369,6 +369,8 @@ static int efifb_probe(struct platform_device *dev)
|
|||||||
if (!si)
|
if (!si)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
dev_set_drvdata(&dev->dev, si);
|
||||||
|
|
||||||
if (si->orig_video_isVGA != VIDEO_TYPE_EFI)
|
if (si->orig_video_isVGA != VIDEO_TYPE_EFI)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user