Index: sys/dev/gpio/gpioled.c =================================================================== --- sys/dev/gpio/gpioled.c +++ sys/dev/gpio/gpioled.c @@ -51,17 +51,10 @@ */ #define GPIOLED_PIN 0 -#define GPIOLED_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define GPIOLED_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define GPIOLED_LOCK_INIT(_sc) mtx_init(&(_sc)->sc_mtx, \ - device_get_nameunit((_sc)->sc_dev), "gpioled", MTX_DEF) -#define GPIOLED_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) - struct gpioled_softc { device_t sc_dev; device_t sc_busdev; - struct mtx sc_mtx; struct cdev *sc_leddev; int sc_invert; }; @@ -77,7 +70,6 @@ struct gpioled_softc *sc; sc = (struct gpioled_softc *)priv; - GPIOLED_LOCK(sc); if (GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, GPIO_PIN_OUTPUT) == 0) { if (sc->sc_invert) @@ -85,7 +77,6 @@ GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, onoff ? GPIO_PIN_HIGH : GPIO_PIN_LOW); } - GPIOLED_UNLOCK(sc); } static int @@ -106,7 +97,6 @@ sc = device_get_softc(dev); sc->sc_dev = dev; sc->sc_busdev = device_get_parent(dev); - GPIOLED_LOCK_INIT(sc); state = 0; @@ -134,7 +124,6 @@ led_destroy(sc->sc_leddev); sc->sc_leddev = NULL; } - GPIOLED_LOCK_DESTROY(sc); return (0); }