From: Thierry Reding <thierry.reding@avionic-design.de>
To: Tushar Behera <tushar.behera@linaro.org>
Cc: linux-kernel@vger.kernel.org, sachin.kamat@linaro.org,
patches@linaro.org
Subject: Re: [PATCH v4] pwm: Fix compilation error when CONFIG_PWM is not defined
Date: Tue, 18 Sep 2012 08:08:06 +0200 [thread overview]
Message-ID: <20120918060806.GA1459@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <1347444106-30509-1-git-send-email-tushar.behera@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]
On Wed, Sep 12, 2012 at 03:31:46PM +0530, Tushar Behera wrote:
> Add dummy implemention of public symbols for compilation-safe inclusion
> of include/linux/pwm.h file when CONFIG_PWM is not defined.
>
> Reported-by: Sachin Kamat <sachin.kamat@linaro.org>
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
> Changes since v3:
> * Nitpicks
>
> Changes since v2:
> * #if condition for legacy functions modified
> * Reverted layout changes, can be taken up when HAVE_PWM is no longer
> required.
>
> Changes since v1:
> * Incorporated Thierry's suggestions regarding adding dummy function
> implemention for all global functions
> * Reorganized header file to have structure definitions first and then the
> function definitions.
>
> include/linux/pwm.h | 71 +++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 69 insertions(+), 2 deletions(-)
Okay, I've applied this to my for-next branch, with some minor changes.
For one I had to merge it with Alex's managed functions patch. Second I
changed all dummy functions that return a struct pwm_device * to return
ERR_PTR(-ENODEV) instead of NULL because PWM users typically check for
IS_ERR(pwm) and not for NULL.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2012-09-18 6:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 10:01 [PATCH v4] pwm: Fix compilation error when CONFIG_PWM is not defined Tushar Behera
2012-09-18 6:08 ` Thierry Reding [this message]
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=20120918060806.GA1459@avionic-0098.mockup.avionic-design.de \
--to=thierry.reding@avionic-design.de \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@linaro.org \
--cc=sachin.kamat@linaro.org \
--cc=tushar.behera@linaro.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