All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jorge Maidana <jorgem.linux@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>,
	Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jorge Maidana <jorgem.linux@gmail.com>,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: [PATCH next] drm/bochs: Use PCI_DEVICE() macro
Date: Fri, 23 Sep 2022 17:42:20 -0300	[thread overview]
Message-ID: <20220923204220.2760-1-jorgem.linux@gmail.com> (raw)

Remove never used 'driver_data' assignments along with the enum
'bochs_types' and make use of PCI_DEVICE() to simplify the elements of
bochs_pci_tbl[].

Signed-off-by: Jorge Maidana <jorgem.linux@gmail.com>
---
 drivers/gpu/drm/tiny/bochs.c | 31 +++----------------------------
 1 file changed, 3 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c
index a51262289..e476c4883 100644
--- a/drivers/gpu/drm/tiny/bochs.c
+++ b/drivers/gpu/drm/tiny/bochs.c
@@ -64,12 +64,6 @@ MODULE_PARM_DESC(defy, "default y resolution");
 
 /* ---------------------------------------------------------------------- */
 
-enum bochs_types {
-	BOCHS_QEMU_STDVGA,
-	BOCHS_SIMICS,
-	BOCHS_UNKNOWN,
-};
-
 struct bochs_device {
 	/* hw */
 	void __iomem   *mmio;
@@ -693,28 +687,9 @@ static void bochs_pci_remove(struct pci_dev *pdev)
 }
 
 static const struct pci_device_id bochs_pci_tbl[] = {
-	{
-		.vendor      = 0x1234,
-		.device      = 0x1111,
-		.subvendor   = PCI_SUBVENDOR_ID_REDHAT_QUMRANET,
-		.subdevice   = PCI_SUBDEVICE_ID_QEMU,
-		.driver_data = BOCHS_QEMU_STDVGA,
-	},
-	{
-		.vendor      = 0x1234,
-		.device      = 0x1111,
-		.subvendor   = PCI_ANY_ID,
-		.subdevice   = PCI_ANY_ID,
-		.driver_data = BOCHS_UNKNOWN,
-	},
-	{
-		.vendor      = 0x4321,
-		.device      = 0x1111,
-		.subvendor   = PCI_ANY_ID,
-		.subdevice   = PCI_ANY_ID,
-		.driver_data = BOCHS_SIMICS,
-	},
-	{ /* end of list */ }
+	{ PCI_DEVICE(0x1234, 0x1111) }, /* Bochs, QEMU */
+	{ PCI_DEVICE(0x4321, 0x1111) }, /* Simics */
+	{ }
 };
 
 static struct pci_driver bochs_pci_driver = {
-- 
2.30.2


                 reply	other threads:[~2022-09-24  6:34 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=20220923204220.2760-1-jorgem.linux@gmail.com \
    --to=jorgem.linux@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.