mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00:00
Last change to pccard_nbk now obviates the need to check the name of
the device in question. Also fix warnings on if_ep_pccard.c
This commit is contained in:
parent
12e0beb470
commit
806338b15d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52585
@ -108,13 +108,7 @@ static int
|
||||
ed_pccard_probe(device_t dev)
|
||||
{
|
||||
int error;
|
||||
const char *name;
|
||||
|
||||
name = pccard_get_name(dev);
|
||||
printf("ed_pccard_probe: Does %s match?\n", name);
|
||||
if (strcmp(name, "ed"))
|
||||
return ENXIO;
|
||||
|
||||
error = ed_probe_WD80x3(dev);
|
||||
if (error == 0)
|
||||
goto end;
|
||||
|
@ -73,17 +73,11 @@ ep_pccard_probe(device_t dev)
|
||||
{
|
||||
struct ep_softc * sc = device_get_softc(dev);
|
||||
struct ep_board * epb = &sc->epb;
|
||||
u_int32_t port_start;
|
||||
u_int32_t port_count;
|
||||
u_long port_start;
|
||||
u_long port_count;
|
||||
const char * desc;
|
||||
const char * name;
|
||||
int error;
|
||||
|
||||
name = pccard_get_name(dev);
|
||||
printf("ep_pccard_probe: Does %s match?\n", name);
|
||||
if (strcmp(name, "ep"))
|
||||
return ENXIO;
|
||||
|
||||
error = bus_get_resource(dev, SYS_RES_IOPORT, 0,
|
||||
&port_start, &port_count);
|
||||
if (error != 0)
|
||||
@ -162,7 +156,7 @@ ep_pccard_attach(device_t dev)
|
||||
struct ep_softc * sc = device_get_softc(dev);
|
||||
int error = 0;
|
||||
|
||||
if (error = ep_alloc(dev)) {
|
||||
if ((error = ep_alloc(dev))) {
|
||||
device_printf(dev, "ep_alloc() failed! (%d)\n", error);
|
||||
goto bad;
|
||||
}
|
||||
@ -210,15 +204,15 @@ ep_pccard_attach(device_t dev)
|
||||
goto bad;
|
||||
}
|
||||
|
||||
if (error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, ep_intr,
|
||||
sc, &sc->ep_intrhand)) {
|
||||
if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, ep_intr,
|
||||
sc, &sc->ep_intrhand))) {
|
||||
device_printf(dev, "bus_setup_intr() failed! (%d)\n", error);
|
||||
goto bad;
|
||||
}
|
||||
|
||||
return (0);
|
||||
bad:
|
||||
ep_free(sc);
|
||||
ep_free(dev);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -489,13 +489,6 @@ static int
|
||||
sio_pccard_probe(dev)
|
||||
device_t dev;
|
||||
{
|
||||
const char *name;
|
||||
|
||||
name = pccard_get_name(dev);
|
||||
printf("sio_pccard_probe: Does %s match?\n", name);
|
||||
if (strcmp(name, "sio"))
|
||||
return ENXIO;
|
||||
|
||||
return (sioprobe(dev));
|
||||
}
|
||||
|
||||
|
@ -489,13 +489,6 @@ static int
|
||||
sio_pccard_probe(dev)
|
||||
device_t dev;
|
||||
{
|
||||
const char *name;
|
||||
|
||||
name = pccard_get_name(dev);
|
||||
printf("sio_pccard_probe: Does %s match?\n", name);
|
||||
if (strcmp(name, "sio"))
|
||||
return ENXIO;
|
||||
|
||||
return (sioprobe(dev));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user