svn commit: r247654 - stable/9/sys/dev/uart

Marius Strobl marius at FreeBSD.org
Sat Mar 2 17:36:30 UTC 2013


Author: marius
Date: Sat Mar  2 17:36:29 2013
New Revision: 247654
URL: http://svnweb.freebsd.org/changeset/base/247654

Log:
  MFC: r246300
  
  - Make pci_ns8250_ids[] const.
  - Use DEVMETHOD_END.
  - Use NULL instead of 0 for pointers.

Modified:
  stable/9/sys/dev/uart/uart_bus_pci.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/uart/uart_bus_pci.c
==============================================================================
--- stable/9/sys/dev/uart/uart_bus_pci.c	Sat Mar  2 17:32:20 2013	(r247653)
+++ stable/9/sys/dev/uart/uart_bus_pci.c	Sat Mar  2 17:36:29 2013	(r247654)
@@ -51,7 +51,7 @@ static device_method_t uart_pci_methods[
 	DEVMETHOD(device_probe,		uart_pci_probe),
 	DEVMETHOD(device_attach,	uart_bus_attach),
 	DEVMETHOD(device_detach,	uart_bus_detach),
-	{ 0, 0 }
+	DEVMETHOD_END
 };
 
 static driver_t uart_pci_driver = {
@@ -70,7 +70,7 @@ struct pci_id {
 	int		rclk;
 };
 
-static struct pci_id pci_ns8250_ids[] = {
+static const struct pci_id pci_ns8250_ids[] = {
 { 0x1028, 0x0008, 0xffff, 0, "Dell Remote Access Card III", 0x14,
 	128 * DEFAULT_RCLK },
 { 0x1028, 0x0012, 0xffff, 0, "Dell RAC 4 Daughter Card Virtual UART", 0x14,
@@ -133,8 +133,8 @@ static struct pci_id pci_ns8250_ids[] = 
 { 0xffff, 0, 0xffff, 0, NULL, 0, 0}
 };
 
-static struct pci_id *
-uart_pci_match(device_t dev, struct pci_id *id)
+const static struct pci_id *
+uart_pci_match(device_t dev, const struct pci_id *id)
 {
 	uint16_t device, subdev, subven, vendor;
 
@@ -159,7 +159,7 @@ static int
 uart_pci_probe(device_t dev)
 {
 	struct uart_softc *sc;
-	struct pci_id *id;
+	const struct pci_id *id;
 
 	sc = device_get_softc(dev);
 
@@ -177,4 +177,4 @@ uart_pci_probe(device_t dev)
 	return (uart_bus_probe(dev, 0, id->rclk, id->rid, 0));
 }
 
-DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, 0, 0);
+DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, NULL, NULL);


More information about the svn-src-all mailing list