[Midnightbsd-cvs] src [8886] trunk/sys/dev/uart/uart_bus_pci.c: use NULL instead of 0 and fix some things

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Sep 26 18:26:13 EDT 2016


Revision: 8886
          http://svnweb.midnightbsd.org/src/?rev=8886
Author:   laffer1
Date:     2016-09-26 18:26:13 -0400 (Mon, 26 Sep 2016)
Log Message:
-----------
use NULL instead of 0 and fix some things

Modified Paths:
--------------
    trunk/sys/dev/uart/uart_bus_pci.c

Modified: trunk/sys/dev/uart/uart_bus_pci.c
===================================================================
--- trunk/sys/dev/uart/uart_bus_pci.c	2016-09-26 22:25:18 UTC (rev 8885)
+++ trunk/sys/dev/uart/uart_bus_pci.c	2016-09-26 22:26:13 UTC (rev 8886)
@@ -51,7 +51,7 @@
 	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 @@
 	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 @@
 { 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 @@
 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 @@
 	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 Midnightbsd-cvs mailing list