mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: deller@gmx.de, gonzalo.silvalde@gmail.com, sfr@canb.auug.org.au
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH] fbdev: sstfb: Fix build after CONFIG_FB_DEVICE changes
Date: Tue, 15 Oct 2024 09:09:20 +0200	[thread overview]
Message-ID: <20241015071029.25639-1-tzimmermann@suse.de> (raw)

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 <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/lkml/20241015120119.533e65e8@canb.auug.org.au/raw
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 7c0510bb3452 ("fbdev: sstfb: Make CONFIG_FB_DEVICE optional")
Cc: Gonzalo Silvalde Blanco <gonzalo.silvalde@gmail.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
---
 drivers/video/fbdev/Kconfig | 1 -
 drivers/video/fbdev/sstfb.c | 6 ++++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index ea36c6956bf3..44a8fdbab6df 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -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
diff --git a/drivers/video/fbdev/sstfb.c b/drivers/video/fbdev/sstfb.c
index 8d2e9d1f8d80..50e9d2e64d4a 100644
--- a/drivers/video/fbdev/sstfb.c
+++ b/drivers/video/fbdev/sstfb.c
@@ -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
-- 
2.46.0


                 reply	other threads:[~2024-10-15  7:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241015071029.25639-1-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=deller@gmx.de \
    --cc=gonzalo.silvalde@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®