Message ID | 1383935464-3484-1-git-send-email-markus.mayer@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDBPXCWUXAARB4O36SJQKGQEMCXX6EA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A5C3720BB3 for <linaro@patches.linaro.org>; Fri, 8 Nov 2013 18:31:14 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf4025846pab.8 for <linaro@patches.linaro.org>; Fri, 08 Nov 2013 10:31:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe:content-type:content-transfer-encoding; bh=7L8d4YmF7BB68qNh1U8VznA45QLyZrIR4EH8fHUcUcU=; b=e9f4QvbaG66E4eDq70ujgGDV72ie8+hSgKVs6Zh2KOdmn44b2QzY9u0Z1a0cKtDMdI bTNi7Al1D0f7AGjvR4YHQsll7CqoTh2TsH98gPZxQYEg0Ql2KltmIe4v7ThFzXpsxMMD yT/cxxU8Bd11URwjeTKNNlpWgRfDnjQyl7UKHY3/IVxrt75UP5jeRuR1ZoRS5Png7RfM wDrqWVXH4Tq/M4bQNHckRfLmRRp2oo5MK39iQzZhKIWirnOw9XYePVehFjAvd8t1OeYl Q+zd0orCGitgOnGi0FbHdLto4Nxbm1JzCEnTGPGFeKut4nAhbx+RRshWtRTOJLbUowFA NeBA== X-Gm-Message-State: ALoCoQlqribbVAngl30/9LwpzGkx8zwxqlBcXCVsqy7UP9/G74rPjeKjbjAVc/5/1q8zPfZxO+9Y X-Received: by 10.66.150.106 with SMTP id uh10mr5224171pab.13.1383935473489; Fri, 08 Nov 2013 10:31:13 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.29.6 with SMTP id f6ls1697272qeh.3.gmail; Fri, 08 Nov 2013 10:31:13 -0800 (PST) X-Received: by 10.58.136.231 with SMTP id qd7mr13058747veb.1.1383935473235; Fri, 08 Nov 2013 10:31:13 -0800 (PST) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id de6si4507228vcb.34.2013.11.08.10.31.13 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Nov 2013 10:31:13 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id pa12so1739073veb.33 for <patchwork-forward@linaro.org>; Fri, 08 Nov 2013 10:31:13 -0800 (PST) X-Received: by 10.58.168.205 with SMTP id zy13mr13170064veb.19.1383935473105; Fri, 08 Nov 2013 10:31:13 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp50103vcz; Fri, 8 Nov 2013 10:31:12 -0800 (PST) X-Received: by 10.224.25.195 with SMTP id a3mr26331963qac.102.1383935472209; Fri, 08 Nov 2013 10:31:12 -0800 (PST) Received: from mms3.broadcom.com (mms3.broadcom.com. [216.31.210.19]) by mx.google.com with ESMTP id s1si3937036qas.146.2013.11.08.10.31.11 for <multiple recipients>; Fri, 08 Nov 2013 10:31:12 -0800 (PST) Received-SPF: neutral (google.com: 216.31.210.19 is neither permitted nor denied by best guess record for domain of markus.mayer@linaro.org) client-ip=216.31.210.19; Received: from [10.9.208.57] by mms3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Fri, 08 Nov 2013 10:30:21 -0800 X-Server-Uuid: B86B6450-0931-4310-942E-F00ED04CA7AF Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Fri, 8 Nov 2013 10:31:04 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.1.438.0; Fri, 8 Nov 2013 10:31:04 -0800 Received: from mail.broadcom.com (lbrmn-lnxub70.ric.broadcom.com [10.136.8.215]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id CC416246B4; Fri, 8 Nov 2013 10:31:00 -0800 (PST) From: "Markus Mayer" <markus.mayer@linaro.org> To: "Linus Walleij" <linus.walleij@linaro.org> cc: "Linaro Patches" <patches@linaro.org>, "Alexandre Courbot" <acourbot@nvidia.com>, "Linux GPIO List" <linux-gpio@vger.kernel.org>, "Markus Mayer" <markus.mayer@linaro.org> Subject: [PATCH] gpio: bcm281xx: Fix return value of bcm_kona_gpio_get() Date: Fri, 8 Nov 2013 10:31:04 -0800 Message-ID: <1383935464-3484-1-git-send-email-markus.mayer@linaro.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-WSS-ID: 7E63F2371SC6196511-01-01 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: markus.mayer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit |
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index 72c927d..db473f1 100644 --- a/drivers/gpio/gpio-bcm-kona.c +++ b/drivers/gpio/gpio-bcm-kona.c @@ -158,7 +158,7 @@ static int bcm_kona_gpio_get(struct gpio_chip *chip, unsigned gpio) spin_unlock_irqrestore(&kona_gpio->lock, flags); /* return the specified bit status */ - return !!(val & bit); + return (val >> bit) & 1; } static int bcm_kona_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)