fbdev: sstfb: Fix build after CONFIG_FB_DEVICE changes
PATCH 1/1 fbdev: sstfb: Fix build after CONFIG_FB_DEVICE changes
Commit 7c0510bb3452 ("fbdev: sstfb: Make CONFIG_FB_DEVICE optional") made sstfb's dependency on CONFIG_FB_DEVICE optional. Fix the build error
drivers/video/fbdev/sstfb.c: In function 'sstfb_probe':drivers/video/fbdev/sstfb.c:1439:2: error: invalid preprocessing directive #fdef; did you mean #ifdef?
1439 | #fdef CONFIG_FB_DEVICE
| ^~~~
| ifdef
drivers/video/fbdev/sstfb.c:1442:2: error: #endif without #if
1442 | #endif
| ^~~~~plus some formatting changes.
Also remove the dependency in the Kconfig rule, so that the driver can be selected without FB_DEVICE enabled.
Reported-by Stephen Rothwell <[email protected]>
Signed-off-by Thomas Zimmermann <[email protected]>
Fixes 7c0510bb3452 ("fbdev: sstfb: Make CONFIG_FB_DEVICE optional")
Cc Gonzalo Silvalde Blanco <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc Helge Deller <[email protected]>
--- drivers/video/fbdev/Kconfig | 1 - drivers/video/fbdev/sstfb.c | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/video/fbdev/Kconfig +0 -1
@@ -1236,7 +1236,6 @@ config FB_3DFX_I2C config FB_VOODOO1 tristate "3Dfx Voodoo Graphics (sst1) support" depends on FB && PCI - depends on FB_DEVICE select FB_IOMEM_HELPERS help Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or
drivers/video/fbdev/sstfb.c +4 -2
@@ -739,7 +739,7 @@ static ssize_t show_vgapass(struct device *device, struct device_attribute *attr }static struct device_attribute device_attrs[] = {__ATTR (vgapass,S_IRUGO |S_IWUSR , show_vgapass, store_vgapass) - }; +};#endif static int sstfb_ioctl(struct fb_info *info, unsigned int cmd,
@@ -1436,7 +1436,8 @@ static int sstfb_probe(struct pci_dev *pdev, const struct pci_device_id *id) }sstfb_clear_screen (info); -#fdef CONFIG_FB_DEVICE + +#ifdef CONFIG_FB_DEVICE if (device_create_file (info->dev, &device_attrs[0 ]))printk (KERN_WARNING "sstfb: can't create sysfs entry.\n" );#endif
@@ -1468,6 +1469,7 @@ static void sstfb_remove(struct pci_dev *pdev) info =pci_get_drvdata (pdev); par = info->par; +#ifdef CONFIG_FB_DEVICE device_remove_file (info->dev, &device_attrs[0 ]);#endif
Signature · 1 line
2.46.0