All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Greg KH <gregkh@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
Subject: [PATCH] PCI: Use new PCI_CLASS_SERIAL_USB_* defines
Date: Sun, 9 Apr 2006 20:07:35 +0200	[thread overview]
Message-ID: <20060409200735.822a1c30.khali@linux-fr.org> (raw)

We could use the recently added PCI_CLASS_SERIAL_USB_UHCI,
PCI_CLASS_SERIAL_USB_OHCI and PCI_CLASS_SERIAL_USB_EHCI defines in
more places, for slightly shorter and clearer code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
 arch/powerpc/platforms/powermac/pci.c |    2 +-
 drivers/usb/host/ehci-pci.c           |    2 +-
 drivers/usb/host/ohci-pci.c           |    2 +-
 drivers/usb/host/uhci-hcd.c           |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

--- linux-2.6.17-rc1.orig/arch/powerpc/platforms/powermac/pci.c	2006-04-03 20:12:30.000000000 +0200
+++ linux-2.6.17-rc1/arch/powerpc/platforms/powermac/pci.c	2006-04-09 19:12:07.000000000 +0200
@@ -1097,7 +1097,7 @@
 	 * (iBook second controller)
 	 */
 	if (dev->vendor == PCI_VENDOR_ID_APPLE
-	    && (dev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x10))
+	    && dev->class == PCI_CLASS_SERIAL_USB_OHCI
 	    && !node) {
 		printk(KERN_INFO "Apple USB OHCI %s disabled by firmware\n",
 		       pci_name(dev));
--- linux-2.6.17-rc1.orig/drivers/usb/host/ehci-pci.c	2006-04-03 20:13:10.000000000 +0200
+++ linux-2.6.17-rc1/drivers/usb/host/ehci-pci.c	2006-04-09 19:12:44.000000000 +0200
@@ -350,7 +350,7 @@
 /* PCI driver selection metadata; PCI hotplugging uses this */
 static const struct pci_device_id pci_ids [] = { {
 	/* handle any USB 2.0 EHCI controller */
-	PCI_DEVICE_CLASS(((PCI_CLASS_SERIAL_USB << 8) | 0x20), ~0),
+	PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_EHCI, ~0),
 	.driver_data =	(unsigned long) &ehci_pci_hc_driver,
 	},
 	{ /* end: all zeroes */ }
--- linux-2.6.17-rc1.orig/drivers/usb/host/ohci-pci.c	2006-04-03 20:13:10.000000000 +0200
+++ linux-2.6.17-rc1/drivers/usb/host/ohci-pci.c	2006-04-09 19:12:27.000000000 +0200
@@ -206,7 +206,7 @@
 
 static const struct pci_device_id pci_ids [] = { {
 	/* handle any USB OHCI controller */
-	PCI_DEVICE_CLASS((PCI_CLASS_SERIAL_USB << 8) | 0x10, ~0),
+	PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_OHCI, ~0),
 	.driver_data =	(unsigned long) &ohci_pci_hc_driver,
 	}, { /* end: all zeroes */ }
 };
--- linux-2.6.17-rc1.orig/drivers/usb/host/uhci-hcd.c	2006-04-03 20:13:10.000000000 +0200
+++ linux-2.6.17-rc1/drivers/usb/host/uhci-hcd.c	2006-04-09 19:10:16.000000000 +0200
@@ -861,7 +861,7 @@
 
 static const struct pci_device_id uhci_pci_ids[] = { {
 	/* handle any USB UHCI controller */
-	PCI_DEVICE_CLASS(((PCI_CLASS_SERIAL_USB << 8) | 0x00), ~0),
+	PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_UHCI, ~0),
 	.driver_data =	(unsigned long) &uhci_driver,
 	}, { /* end: all zeroes */ }
 };


-- 
Jean Delvare

                 reply	other threads:[~2006-04-09 18:07 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=20060409200735.822a1c30.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /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.