From owner-svn-src-all@FreeBSD.ORG Fri Mar 29 19:04:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5D0A1B34; Fri, 29 Mar 2013 19:04:19 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4FF966B4; Fri, 29 Mar 2013 19:04:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2TJ4JGb000551; Fri, 29 Mar 2013 19:04:19 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2TJ4Jrb000550; Fri, 29 Mar 2013 19:04:19 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201303291904.r2TJ4Jrb000550@svn.freebsd.org> From: Ian Lepore Date: Fri, 29 Mar 2013 19:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248910 - head/sys/arm/at91 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.14 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: Fri, 29 Mar 2013 19:04:19 -0000 Author: ian Date: Fri Mar 29 19:04:18 2013 New Revision: 248910 URL: http://svnweb.freebsd.org/changeset/base/248910 Log: Change the API for at91_pio_gpio_get() to return the entire masked set of bits, not just a 0/1 indicating whether any of the masked bits are on. This is compatible with the single in-tree caller of this function right now (at91_vbus_poll() in dev/usb/controller/at91dci_atemelarm.c). Modified: head/sys/arm/at91/at91_pio.c Modified: head/sys/arm/at91/at91_pio.c ============================================================================== --- head/sys/arm/at91/at91_pio.c Fri Mar 29 18:47:08 2013 (r248909) +++ head/sys/arm/at91/at91_pio.c Fri Mar 29 19:04:18 2013 (r248910) @@ -361,9 +361,7 @@ at91_pio_gpio_get(uint32_t pio, uint32_t { uint32_t *PIO = (uint32_t *)(AT91_BASE + pio); - data_mask &= PIO[PIO_PDSR / 4]; - - return (data_mask ? 1 : 0); + return ((PIO[PIO_PDSR / 4] & data_mask)); } void