mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
Provide a working GPIOBUS_IVAR() macro for FDT systems.
This commit is contained in:
parent
b0d69dfad9
commit
b09d4398fa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273566
@ -41,7 +41,12 @@
|
||||
|
||||
#include "gpio_if.h"
|
||||
|
||||
#ifdef FDT
|
||||
#define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) \
|
||||
&((struct ofw_gpiobus_devinfo *)device_get_ivars(d))->opd_dinfo
|
||||
#else
|
||||
#define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) device_get_ivars(d)
|
||||
#endif
|
||||
#define GPIOBUS_SOFTC(d) (struct gpiobus_softc *) device_get_softc(d)
|
||||
#define GPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
|
||||
#define GPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
|
||||
|
Loading…
Reference in New Issue
Block a user