From owner-svn-src-all@FreeBSD.ORG Thu Oct 23 23:12:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0446B1EB; Thu, 23 Oct 2014 23:12:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4C5EFBC; Thu, 23 Oct 2014 23:12:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9NNCUZK022379; Thu, 23 Oct 2014 23:12:30 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9NNCUxU022378; Thu, 23 Oct 2014 23:12:30 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201410232312.s9NNCUxU022378@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 23 Oct 2014 23:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273566 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2014 23:12:31 -0000 Author: loos Date: Thu Oct 23 23:12:30 2014 New Revision: 273566 URL: https://svnweb.freebsd.org/changeset/base/273566 Log: Provide a working GPIOBUS_IVAR() macro for FDT systems. Modified: head/sys/dev/gpio/gpiobusvar.h Modified: head/sys/dev/gpio/gpiobusvar.h ============================================================================== --- head/sys/dev/gpio/gpiobusvar.h Thu Oct 23 23:11:04 2014 (r273565) +++ head/sys/dev/gpio/gpiobusvar.h Thu Oct 23 23:12:30 2014 (r273566) @@ -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)