aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cyapa
diff options
context:
space:
mode:
authorMichael Gmelin <grembo@FreeBSD.org>2015-08-19 09:49:29 +0000
committerMichael Gmelin <grembo@FreeBSD.org>2015-08-19 09:49:29 +0000
commit12e413be27c2432fe10eb600162490513ece9888 (patch)
tree8165b3709a19eea9687cda069154099430f8f460 /sys/dev/cyapa
parent13adf27426182e521ec7c403d470d78a4ec6d434 (diff)
Notes
Diffstat (limited to 'sys/dev/cyapa')
-rw-r--r--sys/dev/cyapa/cyapa.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/dev/cyapa/cyapa.c b/sys/dev/cyapa/cyapa.c
index 2cf10630f42c..035121d7468b 100644
--- a/sys/dev/cyapa/cyapa.c
+++ b/sys/dev/cyapa/cyapa.c
@@ -149,7 +149,6 @@ struct cyapa_fifo {
struct cyapa_softc {
device_t dev;
int count; /* >0 if device opened */
- int unit;
int addr;
struct cdev *devnode;
struct selinfo selinfo;
@@ -450,7 +449,6 @@ static int
cyapa_probe(device_t dev)
{
struct cyapa_cap cap;
- int unit;
int addr;
int error;
@@ -463,8 +461,6 @@ cyapa_probe(device_t dev)
if (addr != 0x67)
return (ENXIO);
- unit = device_get_unit(dev);
-
error = init_device(dev, &cap, addr, 1);
if (error != 0)
return (ENXIO);
@@ -486,7 +482,7 @@ cyapa_attach(device_t dev)
sc->reporting_mode = 1;
unit = device_get_unit(dev);
- addr = *((unsigned char*) device_get_ivars(dev));
+ addr = smbus_get_addr(dev);
if (init_device(dev, &cap, addr, 0))
return (ENXIO);
@@ -494,7 +490,6 @@ cyapa_attach(device_t dev)
mtx_init(&sc->mutex, "cyapa", NULL, MTX_DEF);
sc->dev = dev;
- sc->unit = unit;
sc->addr = addr;
knlist_init_mtx(&sc->selinfo.si_note, &sc->mutex);