linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the battery tree with the hid tree
@ 2015-03-20  4:11 Stephen Rothwell
  2015-03-20  7:58 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2015-03-20  4:11 UTC (permalink / raw)
  To: Sebastian Reichel, Jiri Kosina
  Cc: linux-next, linux-kernel, Krzysztof Kozlowski, Jason Gerecke

[-- Attachment #1: Type: text/plain, Size: 4508 bytes --]

Hi Sebastian,

Today's linux-next merge of the battery tree got conflicts in
drivers/hid/wacom.h and drivers/hid/wacom_sys.c between commit
953f2c5f7163 ("HID: wacom: Centralize updating of wacom_wac battery
status") and fce9957d8f61 ("HID: wacom: Allow dynamic battery
creation/destruction") from the hid tree and commit 297d716f6260
("power_supply: Change ownership from driver to core") from the battery
tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).  I also applied the following merge fixup patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 Mar 2015 14:59:36 +1100
Subject: [PATCH] HID: wacom: merge fix for "Change ownership from driver to core"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/hid/wacom_wac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 5588ba80ede9..57ee0d807af1 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -62,7 +62,7 @@ static void wacom_notify_battery(struct wacom_wac *wacom_wac,
 		wacom_wac->ps_connected = ps_connected;
 
 		if (wacom->battery.dev)
-			power_supply_changed(&wacom->battery);
+			power_supply_changed(wacom->battery);
 	}
 }
 
-- 
2.1.4

and this:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 Mar 2015 15:08:06 +1100
Subject: [PATCH] HID: wacom: merge fix 2 for "Change ownership from driver to core"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/hid/wacom_sys.c | 4 ++--
 drivers/hid/wacom_wac.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 97940d7401d8..7dad9ea31490 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -1343,11 +1343,11 @@ void wacom_battery_work(struct work_struct *work)
 	struct wacom *wacom = container_of(work, struct wacom, work);
 
 	if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) &&
-	     !wacom->battery.dev) {
+	     !wacom->battery) {
 		wacom_initialize_battery(wacom);
 	}
 	else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) &&
-		 wacom->battery.dev) {
+		 wacom->battery) {
 		wacom_destroy_battery(wacom);
 	}
 }
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 57ee0d807af1..1a3ce3767415 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -61,7 +61,7 @@ static void wacom_notify_battery(struct wacom_wac *wacom_wac,
 		wacom_wac->bat_connected = bat_connected;
 		wacom_wac->ps_connected = ps_connected;
 
-		if (wacom->battery.dev)
+		if (wacom->battery)
 			power_supply_changed(wacom->battery);
 	}
 }
@@ -2012,7 +2012,7 @@ static int wacom_status_irq(struct wacom_wac *wacom_wac, size_t len)
 		wacom_notify_battery(wacom_wac, battery, charging,
 				     battery || charging, 1);
 
-		if (!wacom->battery.dev &&
+		if (!wacom->battery &&
 		    !(features->quirks & WACOM_QUIRK_BATTERY)) {
 			features->quirks |= WACOM_QUIRK_BATTERY;
 			INIT_WORK(&wacom->work, wacom_battery_work);
@@ -2020,7 +2020,7 @@ static int wacom_status_irq(struct wacom_wac *wacom_wac, size_t len)
 		}
 	}
 	else if ((features->quirks & WACOM_QUIRK_BATTERY) &&
-		 wacom->battery.dev) {
+		 wacom->battery) {
 		features->quirks &= ~WACOM_QUIRK_BATTERY;
 		INIT_WORK(&wacom->work, wacom_battery_work);
 		wacom_schedule_work(wacom_wac);
-- 
2.1.4

There may be more required, of course.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/hid/wacom.h
index ad7318db1dfe,0d0d0dd89d17..000000000000
--- a/drivers/hid/wacom.h
+++ b/drivers/hid/wacom.h
diff --cc drivers/hid/wacom_sys.c
index 353fe476be26,ba9af470bea0..000000000000
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@@ -1063,11 -1045,12 +1067,11 @@@ static int wacom_initialize_battery(str
  
  static void wacom_destroy_battery(struct wacom *wacom)
  {
- 	if (wacom->battery.dev) {
- 		power_supply_unregister(&wacom->battery);
- 		wacom->battery.dev = NULL;
- 		power_supply_unregister(&wacom->ac);
- 		wacom->ac.dev = NULL;
 -	if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) &&
 -	     wacom->battery) {
++	if (wacom->battery) {
+ 		power_supply_unregister(wacom->battery);
+ 		wacom->battery = NULL;
+ 		power_supply_unregister(wacom->ac);
+ 		wacom->ac = NULL;
  	}
  }
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: linux-next: manual merge of the battery tree with the hid tree
  2015-03-20  4:11 linux-next: manual merge of the battery tree with the hid tree Stephen Rothwell
@ 2015-03-20  7:58 ` Krzysztof Kozlowski
  2015-03-20  8:59   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2015-03-20  7:58 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Sebastian Reichel, Jiri Kosina, linux-next, linux-kernel,
	Krzysztof Kozlowski, Jason Gerecke

2015-03-20 5:11 GMT+01:00 Stephen Rothwell <sfr@canb.auug.org.au>:
> Hi Sebastian,
>
> Today's linux-next merge of the battery tree got conflicts in
> drivers/hid/wacom.h and drivers/hid/wacom_sys.c between commit
> 953f2c5f7163 ("HID: wacom: Centralize updating of wacom_wac battery
> status") and fce9957d8f61 ("HID: wacom: Allow dynamic battery
> creation/destruction") from the hid tree and commit 297d716f6260
> ("power_supply: Change ownership from driver to core") from the battery
> tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).  I also applied the following merge fixup patch.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 20 Mar 2015 14:59:36 +1100
> Subject: [PATCH] HID: wacom: merge fix for "Change ownership from driver to core"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/hid/wacom_wac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
> index 5588ba80ede9..57ee0d807af1 100644
> --- a/drivers/hid/wacom_wac.c
> +++ b/drivers/hid/wacom_wac.c
> @@ -62,7 +62,7 @@ static void wacom_notify_battery(struct wacom_wac *wacom_wac,
>                 wacom_wac->ps_connected = ps_connected;
>
>                 if (wacom->battery.dev)

Should be:
if (wacom->battery)

Rest of patch looks fine but indeed some more changes are required.

How about preparing an immutable branch from HID or battery tree so we
could resolve these conflicts easily?

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: manual merge of the battery tree with the hid tree
  2015-03-20  7:58 ` Krzysztof Kozlowski
@ 2015-03-20  8:59   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2015-03-20  8:59 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Sebastian Reichel, Jiri Kosina, linux-next, linux-kernel, Jason Gerecke

On pią, 2015-03-20 at 08:58 +0100, Krzysztof Kozlowski wrote:
> 2015-03-20 5:11 GMT+01:00 Stephen Rothwell <sfr@canb.auug.org.au>:
> > Hi Sebastian,
> >
> > Today's linux-next merge of the battery tree got conflicts in
> > drivers/hid/wacom.h and drivers/hid/wacom_sys.c between commit
> > 953f2c5f7163 ("HID: wacom: Centralize updating of wacom_wac battery
> > status") and fce9957d8f61 ("HID: wacom: Allow dynamic battery
> > creation/destruction") from the hid tree and commit 297d716f6260
> > ("power_supply: Change ownership from driver to core") from the battery
> > tree.
> >
> > I fixed it up (see below) and can carry the fix as necessary (no action
> > is required).  I also applied the following merge fixup patch.
> >
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Fri, 20 Mar 2015 14:59:36 +1100
> > Subject: [PATCH] HID: wacom: merge fix for "Change ownership from driver to core"
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/hid/wacom_wac.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
> > index 5588ba80ede9..57ee0d807af1 100644
> > --- a/drivers/hid/wacom_wac.c
> > +++ b/drivers/hid/wacom_wac.c
> > @@ -62,7 +62,7 @@ static void wacom_notify_battery(struct wacom_wac *wacom_wac,
> >                 wacom_wac->ps_connected = ps_connected;
> >
> >                 if (wacom->battery.dev)
> 
> Should be:
> if (wacom->battery)
> 
> Rest of patch looks fine but indeed some more changes are required.

Actually after looking at current next this Stephen's merge resolution
is sufficient for HID. I did not find any more issues. After that
s/battery.dev/battery/ change:

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Thanks Stephen for fixing!

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-20  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20  4:11 linux-next: manual merge of the battery tree with the hid tree Stephen Rothwell
2015-03-20  7:58 ` Krzysztof Kozlowski
2015-03-20  8:59   ` Krzysztof Kozlowski

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).