summaryrefslogtreecommitdiffstats
path: root/sys/dev/mly/mly.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mly/mly.c')
-rw-r--r--sys/dev/mly/mly.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c
index d9e78bd..2fcaadc 100644
--- a/sys/dev/mly/mly.c
+++ b/sys/dev/mly/mly.c
@@ -2834,7 +2834,7 @@ mly_print_controller(int controller)
static int
mly_user_open(struct cdev *dev, int flags, int fmt, struct thread *td)
{
- int unit = minor(dev);
+ int unit = dev2unit(dev);
struct mly_softc *sc = devclass_get_softc(devclass_find("mly"), unit);
sc->mly_state |= MLY_STATE_OPEN;
@@ -2847,7 +2847,7 @@ mly_user_open(struct cdev *dev, int flags, int fmt, struct thread *td)
static int
mly_user_close(struct cdev *dev, int flags, int fmt, struct thread *td)
{
- int unit = minor(dev);
+ int unit = dev2unit(dev);
struct mly_softc *sc = devclass_get_softc(devclass_find("mly"), unit);
sc->mly_state &= ~MLY_STATE_OPEN;
OpenPOWER on IntegriCloud