- Make pci_ns8250_ids[] const.
- Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. MFC after: 1 week
This commit is contained in:
parent
be0c475e56
commit
dec2801609
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246300
@ -52,7 +52,7 @@ static device_method_t uart_pci_methods[] = {
|
|||||||
DEVMETHOD(device_attach, uart_bus_attach),
|
DEVMETHOD(device_attach, uart_bus_attach),
|
||||||
DEVMETHOD(device_detach, uart_bus_detach),
|
DEVMETHOD(device_detach, uart_bus_detach),
|
||||||
DEVMETHOD(device_resume, uart_bus_resume),
|
DEVMETHOD(device_resume, uart_bus_resume),
|
||||||
{ 0, 0 }
|
DEVMETHOD_END
|
||||||
};
|
};
|
||||||
|
|
||||||
static driver_t uart_pci_driver = {
|
static driver_t uart_pci_driver = {
|
||||||
@ -71,7 +71,7 @@ struct pci_id {
|
|||||||
int rclk;
|
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,
|
{ 0x1028, 0x0008, 0xffff, 0, "Dell Remote Access Card III", 0x14,
|
||||||
128 * DEFAULT_RCLK },
|
128 * DEFAULT_RCLK },
|
||||||
{ 0x1028, 0x0012, 0xffff, 0, "Dell RAC 4 Daughter Card Virtual UART", 0x14,
|
{ 0x1028, 0x0012, 0xffff, 0, "Dell RAC 4 Daughter Card Virtual UART", 0x14,
|
||||||
@ -134,8 +134,8 @@ static struct pci_id pci_ns8250_ids[] = {
|
|||||||
{ 0xffff, 0, 0xffff, 0, NULL, 0, 0}
|
{ 0xffff, 0, 0xffff, 0, NULL, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct pci_id *
|
const static struct pci_id *
|
||||||
uart_pci_match(device_t dev, struct pci_id *id)
|
uart_pci_match(device_t dev, const struct pci_id *id)
|
||||||
{
|
{
|
||||||
uint16_t device, subdev, subven, vendor;
|
uint16_t device, subdev, subven, vendor;
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ static int
|
|||||||
uart_pci_probe(device_t dev)
|
uart_pci_probe(device_t dev)
|
||||||
{
|
{
|
||||||
struct uart_softc *sc;
|
struct uart_softc *sc;
|
||||||
struct pci_id *id;
|
const struct pci_id *id;
|
||||||
|
|
||||||
sc = device_get_softc(dev);
|
sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -178,4 +178,4 @@ uart_pci_probe(device_t dev)
|
|||||||
return (uart_bus_probe(dev, 0, id->rclk, id->rid, 0));
|
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user