linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Courbot <gnurou@gmail.com>
To: Grant Likely <grant.likely@secretlab.ca>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: linux-kernel@vger.kernel.org, gnurou@gmail.com
Subject: [PATCH 4/4] gpiolib: rename local offset variables to "hwgpio"
Date: Wed, 13 Feb 2013 16:03:03 +0900	[thread overview]
Message-ID: <1360738983-22436-6-git-send-email-gnurou@gmail.com> (raw)
In-Reply-To: <1360738983-22436-1-git-send-email-gnurou@gmail.com>

Delivered-To: gnurou@gmail.com
Received: by 10.64.96.232 with SMTP id dv8csp15271ieb;
        Sun, 10 Feb 2013 05:48:07 -0800 (PST)
X-Received: by 10.68.0.39 with SMTP id 7mr11102539pbb.124.1360504086445;
        Sun, 10 Feb 2013 05:48:06 -0800 (PST)
Return-Path: <acourbot@nvidia.com>
Received: from hqemgate04.nvidia.com (hqemgate04.nvidia.com. [216.228.121.35])
        by mx.google.com with ESMTPS id qj7si3931281pbb.322.2013.02.10.05.48.06
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Sun, 10 Feb 2013 05:48:06 -0800 (PST)
Received-SPF: pass (google.com: best guess record for domain of acourbot@nvidia.com designates 216.228.121.35 as permitted sender) client-ip=216.228.121.35;
Authentication-Results: mx.google.com;
       spf=pass (google.com: best guess record for domain of acourbot@nvidia.com designates 216.228.121.35 as permitted sender) smtp.mail=acourbot@nvidia.com
Received: from hqnvupgp05.nvidia.com (Not Verified[216.228.121.13]) by hqemgate04.nvidia.com
	id <B5117a50b0000>; Sun, 10 Feb 2013 05:47:56 -0800
Received: from hqemhub01.nvidia.com ([172.17.108.22])
  by hqnvupgp05.nvidia.com (PGP Universal service);
  Sun, 10 Feb 2013 05:48:05 -0800
X-PGP-Universal: processed;
	by hqnvupgp05.nvidia.com on Sun, 10 Feb 2013 05:48:05 -0800
Received: from [10.18.131.155] (172.20.144.16) by hqemhub01.nvidia.com
 (172.20.150.30) with Microsoft SMTP Server id 8.3.297.1; Sun, 10 Feb 2013
 05:48:05 -0800
Message-ID: <5117A5AB.5090702@nvidia.com>
Date: Sun, 10 Feb 2013 22:50:35 +0900
From: Alex Courbot <acourbot@nvidia.com>
Organization: NVIDIA
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130109 Thunderbird/17.0.2
MIME-Version: 1.0
To: <gnurou@gmail.com>
Subject: Re: [grant:gpio/next 10/16] gpiolib.c:undefined reference to `gpiod_unexport'
References: <51166e1c.NRfQN8VgI14zuNwf%fengguang.wu@intel.com> <CACxGe6tAEX7o9dxNTXtwKwzZHmEteKAS+7uy4j-DTX_2V583tg@mail.gmail.com>
In-Reply-To: <CACxGe6tAEX7o9dxNTXtwKwzZHmEteKAS+7uy4j-DTX_2V583tg@mail.gmail.com>
Return-Path: acourbot@nvidia.com
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit

On 02/10/2013 01:34 AM, Grant Likely wrote:
> Alex, this is broken when the sysfs interface isn't enabled. Can you
> send a fixup patch?
>
> g.
>
> On Sat, Feb 9, 2013 at 3:41 PM, kbuild test robot
> <fengguang.wu@intel.com> wrote:
>> tree:   git://git.secretlab.ca/git/linux-2.6.git gpio/next
>> head:   8a307b35962e42de0f998c6029e8851c61eadb4e
>> commit: 5bb47609e8167d733786cb781ada29536385635c [10/16] gpiolib: use descriptors internally
>> config: i386-randconfig-b040 (attached as .config)
>>
>> All error/warnings:
>>
>>     drivers/built-in.o: In function `gpiod_free':
>>>> gpiolib.c:(.text+0xda3): undefined reference to `gpiod_unexport'
>>     drivers/built-in.o: In function `gpio_request_one':
>>>> (.text+0x147f): undefined reference to `gpiod_export'

Oops, apologies. Here follows the fix. Please meld it into the culprit 
patch to fix all warnings and errors when sysfs is not compiled in.

Thanks,
Alex.

---
  drivers/gpio/gpiolib.c | 21 +++++++++++++++++++++
  1 file changed, 21 insertions(+)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index e6e597c..b5a71c5 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1085,6 +1085,27 @@ static inline void gpiochip_unexport(struct 
gpio_chip *chip)
  {
  }

+static inline int gpiod_export(struct gpio_desc *desc,
+                              bool direction_may_change)
+{
+       return -ENOSYS;
+}
+
+static inline int gpiod_export_link(struct device *dev, const char *name,
+                                   struct gpio_desc *desc)
+{
+       return -ENOSYS;
+}
+
+static inline int gpiod_sysfs_set_active_low(struct gpio_desc *desc, 
int value)
+{
+       return -ENOSYS;
+}
+
+static inline void gpiod_unexport(struct gpio_desc *desc)
+{
+}
+
  #endif /* CONFIG_GPIO_SYSFS */

  /*
-- 
1.8.1.3

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

  parent reply	other threads:[~2013-02-13  7:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13  7:02 [PATCH 0/4] gpiolib: some fixup patches Alexandre Courbot
2013-02-13  7:02 ` [PATCH 1/4] gpiolib: check descriptors validity before use Alexandre Courbot
2013-02-13 22:49   ` Ryan Mallon
2013-02-14  3:00     ` Alexandre Courbot
2013-02-13  7:03 ` [PATCH 2/4] gpiolib: use const parameters when possible Alexandre Courbot
2014-11-17  9:09   ` Uwe Kleine-König
2014-11-19  8:33     ` Alexandre Courbot
2014-11-19  8:44       ` Uwe Kleine-König
2014-11-19  8:57         ` Alexandre Courbot
2014-11-19  9:02           ` Uwe Kleine-König
2014-11-19  9:07             ` Alexandre Courbot
2014-11-19 10:09               ` Uwe Kleine-König
2014-11-25  7:37                 ` Alexandre Courbot
2014-11-25  9:36                   ` Janusz Użycki
2013-02-13  7:03 ` [PATCH 3/4] gpiolib: move comment to right function Alexandre Courbot
2013-02-13  7:03 ` [PATCH 4/4] gpiolib: rename local offset variables to "hwgpio" Alexandre Courbot
2013-02-13 22:54   ` Ryan Mallon
2013-02-14  3:11     ` Alexandre Courbot
2013-02-13  7:03 ` Alexandre Courbot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-02-15  5:46 [PATCH v2 0/4] gpiolib: some fixup patches Alexandre Courbot
2013-02-15  5:46 ` [PATCH 4/4] gpiolib: rename local offset variables to "hwgpio" Alexandre Courbot
2013-02-26 17:51   ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360738983-22436-6-git-send-email-gnurou@gmail.com \
    --to=gnurou@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).