From: Johannes Thumshirn <morbidrsa@gmail.com>
To: thierry.reding@avionic-design.de, morbidrsa@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] pwm: twl: Use to_twl() instead of container_of()
Date: Sat, 16 Feb 2013 20:54:32 +0100 [thread overview]
Message-ID: <1361044472-6439-1-git-send-email-morbidrsa@gmail.com> (raw)
In-Reply-To: <1361038851-4994-1-git-send-email-morbidrsa@gmail.com>
Always use to_twl() for converting into private data instead of container_of()
Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com>
---
drivers/pwm/pwm-twl.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c
index a34c235..9cd2c9a 100644
--- a/drivers/pwm/pwm-twl.c
+++ b/drivers/pwm/pwm-twl.c
@@ -200,8 +200,7 @@ out:
static void twl4030_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{
- struct twl_pwm_chip *twl = container_of(chip, struct twl_pwm_chip,
- chip);
+ struct twl_pwm_chip *twl = to_twl(chip);
int ret;
u8 val, mask;
@@ -231,8 +230,7 @@ out:
static int twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{
- struct twl_pwm_chip *twl = container_of(chip, struct twl_pwm_chip,
- chip);
+ struct twm_pwm_chip *twl = to_twl(chip);
int ret;
u8 val;
--
1.8.1.3
next prev parent reply other threads:[~2013-02-16 19:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-16 18:20 [PATCH] pwm: twl: Use to_twl() instead of container_of() Johannes Thumshirn
2013-02-16 18:56 ` Thierry Reding
2013-02-16 19:42 ` Johannes Thumshirn
2013-02-16 19:54 ` Johannes Thumshirn [this message]
2013-02-16 20:21 ` Thierry Reding
2013-02-17 10:08 ` [PATCH] pwm: twl: Fix typo that broke build Johannes Thumshirn
2013-02-17 10:26 ` Thierry Reding
2013-02-17 15:04 ` Johannes Thumshirn
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=1361044472-6439-1-git-send-email-morbidrsa@gmail.com \
--to=morbidrsa@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=thierry.reding@avionic-design.de \
/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