* [PATCH] pwm: twl: Use to_twl() instead of container_of()
@ 2013-02-16 18:20 Johannes Thumshirn
2013-02-16 18:56 ` Thierry Reding
2013-02-16 19:54 ` Johannes Thumshirn
0 siblings, 2 replies; 8+ messages in thread
From: Johannes Thumshirn @ 2013-02-16 18:20 UTC (permalink / raw)
To: thierry.reding, morbidrsa; +Cc: linux-kernel
In twl6030_pwm_disable() use to_twl() instead of container_of() like in the
rest of the driver.
Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com>
---
drivers/pwm/pwm-twl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c
index f783efc..a34c235 100644
--- a/drivers/pwm/pwm-twl.c
+++ b/drivers/pwm/pwm-twl.c
@@ -255,8 +255,7 @@ out:
static void twl6030_pwm_disable(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;
--
1.8.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] pwm: twl: Use to_twl() instead of container_of()
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
1 sibling, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2013-02-16 18:56 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 490 bytes --]
On Sat, Feb 16, 2013 at 07:20:51PM +0100, Johannes Thumshirn wrote:
> In twl6030_pwm_disable() use to_twl() instead of container_of() like in the
> rest of the driver.
>
> Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com>
> ---
> drivers/pwm/pwm-twl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Hi Johannes,
I see that container_of() is also still used in twl4030_pwm_free() and
twl6030_pwm_enable(). Would you mind fixing those up as well?
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] pwm: twl: Use to_twl() instead of container_of()
2013-02-16 18:56 ` Thierry Reding
@ 2013-02-16 19:42 ` Johannes Thumshirn
0 siblings, 0 replies; 8+ messages in thread
From: Johannes Thumshirn @ 2013-02-16 19:42 UTC (permalink / raw)
To: Thierry Reding, morbidrsa; +Cc: linux-kernel
On Sat, Feb 16, 2013 at 07:56:18PM +0100, Thierry Reding wrote:
> On Sat, Feb 16, 2013 at 07:20:51PM +0100, Johannes Thumshirn wrote:
> > In twl6030_pwm_disable() use to_twl() instead of container_of() like in the
> > rest of the driver.
> >
> > Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com>
> > ---
> > drivers/pwm/pwm-twl.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
>
> Hi Johannes,
>
> I see that container_of() is also still used in twl4030_pwm_free() and
> twl6030_pwm_enable(). Would you mind fixing those up as well?
>
> Thierry
Oh sorry haven't seen them, I'll take care of it.
Johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] pwm: twl: Use to_twl() instead of container_of()
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:54 ` Johannes Thumshirn
2013-02-16 20:21 ` Thierry Reding
1 sibling, 1 reply; 8+ messages in thread
From: Johannes Thumshirn @ 2013-02-16 19:54 UTC (permalink / raw)
To: thierry.reding, morbidrsa; +Cc: linux-kernel
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] pwm: twl: Use to_twl() instead of container_of()
2013-02-16 19:54 ` Johannes Thumshirn
@ 2013-02-16 20:21 ` Thierry Reding
2013-02-17 10:08 ` [PATCH] pwm: twl: Fix typo that broke build Johannes Thumshirn
0 siblings, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2013-02-16 20:21 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
On Sat, Feb 16, 2013 at 08:54:32PM +0100, Johannes Thumshirn wrote:
> 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(-)
I've squashed this patch into the previous one and applied to the
for-next branch. Thanks,
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] pwm: twl: Fix typo that broke build
2013-02-16 20:21 ` Thierry Reding
@ 2013-02-17 10:08 ` Johannes Thumshirn
2013-02-17 10:26 ` Thierry Reding
0 siblings, 1 reply; 8+ messages in thread
From: Johannes Thumshirn @ 2013-02-17 10:08 UTC (permalink / raw)
To: thierry.reding, morbidrsa; +Cc: linux-kernel
Fix a little type that unfortunately broke the build :-(
Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com>
---
drivers/pwm/pwm-twl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c
index 9cd2c9a..bf3fda2 100644
--- a/drivers/pwm/pwm-twl.c
+++ b/drivers/pwm/pwm-twl.c
@@ -230,7 +230,7 @@ out:
static int twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{
- struct twm_pwm_chip *twl = to_twl(chip);
+ struct twl_pwm_chip *twl = to_twl(chip);
int ret;
u8 val;
--
1.8.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] pwm: twl: Fix typo that broke build
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
0 siblings, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2013-02-17 10:26 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 391 bytes --]
On Sun, Feb 17, 2013 at 11:08:13AM +0100, Johannes Thumshirn wrote:
> Fix a little type that unfortunately broke the build :-(
> Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com>
> ---
> drivers/pwm/pwm-twl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Uh... I hadn't noticed and deemed the patch trivial enough so I didn't
even build test. That'll teach me. =\
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] pwm: twl: Fix typo that broke build
2013-02-17 10:26 ` Thierry Reding
@ 2013-02-17 15:04 ` Johannes Thumshirn
0 siblings, 0 replies; 8+ messages in thread
From: Johannes Thumshirn @ 2013-02-17 15:04 UTC (permalink / raw)
To: Thierry Reding, morbidrsa; +Cc: linux-kernel
On Sun, Feb 17, 2013 at 11:26:30AM +0100, Thierry Reding wrote:
> On Sun, Feb 17, 2013 at 11:08:13AM +0100, Johannes Thumshirn wrote:
> > Fix a little type that unfortunately broke the build :-(
> > Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com>
> > ---
> > drivers/pwm/pwm-twl.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Uh... I hadn't noticed and deemed the patch trivial enough so I didn't
> even build test. That'll teach me. =\
>
> Thierry
Me too.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-02-17 15:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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).