aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iicbus
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2006-04-04 23:29:17 +0000
committerWarner Losh <imp@FreeBSD.org>2006-04-04 23:29:17 +0000
commitdbafaeca13d55a373ba540eabc60e840a803f9a6 (patch)
tree46fbd1234540dd0649af3d7046fe7a40bff30e7d /sys/dev/iicbus
parent18f1afb9f4ca721d7c92b5c2f16132f349a16b46 (diff)
Notes
Diffstat (limited to 'sys/dev/iicbus')
-rw-r--r--sys/dev/iicbus/iic.c8
-rw-r--r--sys/dev/iicbus/iicbb.c4
-rw-r--r--sys/dev/iicbus/iicsmb.c2
3 files changed, 1 insertions, 13 deletions
diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c
index 9dd1431dbc040..28339fa510ed0 100644
--- a/sys/dev/iicbus/iic.c
+++ b/sys/dev/iicbus/iic.c
@@ -122,15 +122,9 @@ iic_attach(device_t dev)
{
struct iic_softc *sc = (struct iic_softc *)device_get_softc(dev);
- if (!sc)
- return (ENOMEM);
-
- bzero(sc, sizeof(struct iic_softc));
-
sc->sc_devnode = make_dev(&iic_cdevsw, device_get_unit(dev),
UID_ROOT, GID_WHEEL,
0600, "iic%d", device_get_unit(dev));
-
return (0);
}
@@ -146,7 +140,7 @@ iic_detach(device_t dev)
}
static int
-iicopen (struct cdev *dev, int flags, int fmt, struct thread *td)
+iicopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct iic_softc *sc = IIC_SOFTC(minor(dev));
diff --git a/sys/dev/iicbus/iicbb.c b/sys/dev/iicbus/iicbb.c
index 53ecdceb947f1..554f4357380a4 100644
--- a/sys/dev/iicbus/iicbb.c
+++ b/sys/dev/iicbus/iicbb.c
@@ -115,13 +115,9 @@ static int iicbb_attach(device_t dev)
{
struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev);
- bzero(sc, sizeof(struct iicbb_softc));
-
sc->iicbus = device_add_child(dev, "iicbus", -1);
-
if (!sc->iicbus)
return (ENXIO);
-
bus_generic_attach(dev);
return (0);
diff --git a/sys/dev/iicbus/iicsmb.c b/sys/dev/iicbus/iicsmb.c
index 966063f2a13b2..c2d45d4513e0d 100644
--- a/sys/dev/iicbus/iicsmb.c
+++ b/sys/dev/iicbus/iicsmb.c
@@ -153,8 +153,6 @@ iicsmb_attach(device_t dev)
{
struct iicsmb_softc *sc = (struct iicsmb_softc *)device_get_softc(dev);
- bzero(sc, sizeof(*sc));
-
sc->smbus = device_add_child(dev, "smbus", -1);
/* probe and attach the smbus */