linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the hid tree
@ 2008-10-16  3:49 Stephen Rothwell
  2008-10-16  9:34 ` Jiri Kosina
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2008-10-16  3:49 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-next

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

Hi Jiri,

Today's linux-next merge of the hid tree got several conflicts against the
usb tree and Linus' tree.

I have dropped it for today, please do a resync with Linus' tree for
tomorrow.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread
* linux-next: manual merge of the hid tree
@ 2008-10-14  6:51 Stephen Rothwell
  2008-10-14  7:12 ` Jiri Kosina
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2008-10-14  6:51 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-next, Greg Kroah-Hartman

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

Hi Jiri,

Today's linux-next merge of the hid tree got a conflict in
drivers/hid/hid-tmff.c between commits
454db62d208add27f30fcbcc00435768245407c9 ("USB: remove warn() macro from
usb hid drivers") and 3e85ea87fdfbb9440dacda77b4de30472e0d38c9 ("USB:
remove info() macro from usb HID drivers") from the usb tree and commit
a9c923a59c4f106ee7385a5b210215db3eeb1d8d ("HID: convert to dev_* prints")
from the hid tree.

I fixed it up (just used the hid tree versions) and can carry the fix.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread
* linux-next: manual merge of the hid tree
@ 2008-08-25  4:46 Stephen Rothwell
  2008-08-25 15:50 ` Dmitry Torokhov
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2008-08-25  4:46 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-next, Henrik Rydberg, Dmitry Torokhov, Jiri Slaby

Hi Jiri,

Today's linux-next merge of the hid tree got a conflict in
drivers/hid/usbhid/hid-quirks.c between commit
f89bd95c5c946776f116ffeb997653d4193d6a35 ("Input: bcm5974 - add driver
for Macbook Air and Pro Penryn touchpads") from Linus' tree and
commit8216ac91aeff627cc6169df46e0fbb2097716f56 ("HID: move apple quirks")
from the hid tree.

I used the version of that file from the hid tree and then added the
following patch (which may be completely wrong).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 2d0b387..ed43749 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -420,17 +420,17 @@ static const struct hid_device_id apple_devices[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
 		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
-		.driver_data = APPLE_HAS_FN },
+		.driver_data = APPLE_HAS_FN |APPLE_IGNORE_MOUSE },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO),
-		.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
+		.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD |APPLE_IGNORE_MOUSE },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS),
-		.driver_data = APPLE_HAS_FN },
+		.driver_data = APPLE_HAS_FN |APPLE_IGNORE_MOUSE },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI),
-		.driver_data = APPLE_HAS_FN },
+		.driver_data = APPLE_HAS_FN |APPLE_IGNORE_MOUSE },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO),
-		.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
+		.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD |APPLE_IGNORE_MOUSE },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS),
-		.driver_data = APPLE_HAS_FN },
+		.driver_data = APPLE_HAS_FN |APPLE_IGNORE_MOUSE },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY),
 		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
 			APPLE_IGNORE_MOUSE },

^ permalink raw reply related	[flat|nested] 17+ messages in thread
* linux-next: manual merge of the hid tree
@ 2008-08-25  4:26 Stephen Rothwell
  2008-08-25  4:49 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2008-08-25  4:26 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-next, Greg KH

Hi Jiri,

Today's linux-next merge of the hid tree got a conflict in
drivers/hid/usbhid/hid-core.c between commit
42c057049eb3ca9bad38fb0acc6290771a11d9ff ("USB: remove warn() macro from
usb.h") from the usb tree and commit
128fc1f24bbb042b8d586dfba4db9ee7caac52bd ("HID: indent switches/cases")
from the hid tree.

I did the obvious fixups (see below).

Jiri, you should be able to apply the appropriate part of Greg's patch to
your tree as it only depends on stuff that is already in Linus' tree.  I
have added that partial patch below. (Greg, do you want to Sign-off on
that, please?)  (I don't mind if the patch is in both trees - Greg you
might consider breaking up those warn() and info() (and err()?) removal
patches and sending them to the appropriate maintainers.)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Merge fixup result:

diff --cc drivers/hid/usbhid/hid-core.c
index c018347,4ec10aa..0000000
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@@ -197,32 -189,31 +189,32 @@@ static void hid_irq_in(struct urb *urb
  	int			status;
  
  	switch (urb->status) {
- 		case 0:			/* success */
- 			usbhid->retry_delay = 0;
- 			hid_input_report(urb->context, HID_INPUT_REPORT,
- 					 urb->transfer_buffer,
- 					 urb->actual_length, 1);
- 			break;
- 		case -EPIPE:		/* stall */
- 			clear_bit(HID_IN_RUNNING, &usbhid->iofl);
- 			set_bit(HID_CLEAR_HALT, &usbhid->iofl);
- 			schedule_work(&usbhid->reset_work);
- 			return;
- 		case -ECONNRESET:	/* unlink */
- 		case -ENOENT:
- 		case -ESHUTDOWN:	/* unplug */
- 			clear_bit(HID_IN_RUNNING, &usbhid->iofl);
- 			return;
- 		case -EILSEQ:		/* protocol error or unplug */
- 		case -EPROTO:		/* protocol error or unplug */
- 		case -ETIME:		/* protocol error or unplug */
- 		case -ETIMEDOUT:	/* Should never happen, but... */
- 			clear_bit(HID_IN_RUNNING, &usbhid->iofl);
- 			hid_io_error(hid);
- 			return;
- 		default:		/* error */
- 			dev_warn(&urb->dev->dev, "input irq status %d "
- 				 "received\n", urb->status);
+ 	case 0:			/* success */
+ 		usbhid->retry_delay = 0;
+ 		hid_input_report(urb->context, HID_INPUT_REPORT,
+ 				 urb->transfer_buffer,
+ 				 urb->actual_length, 1);
+ 		break;
+ 	case -EPIPE:		/* stall */
+ 		clear_bit(HID_IN_RUNNING, &usbhid->iofl);
+ 		set_bit(HID_CLEAR_HALT, &usbhid->iofl);
+ 		schedule_work(&usbhid->reset_work);
+ 		return;
+ 	case -ECONNRESET:	/* unlink */
+ 	case -ENOENT:
+ 	case -ESHUTDOWN:	/* unplug */
+ 		clear_bit(HID_IN_RUNNING, &usbhid->iofl);
+ 		return;
+ 	case -EILSEQ:		/* protocol error or unplug */
+ 	case -EPROTO:		/* protocol error or unplug */
+ 	case -ETIME:		/* protocol error or unplug */
+ 	case -ETIMEDOUT:	/* Should never happen, but... */
+ 		clear_bit(HID_IN_RUNNING, &usbhid->iofl);
+ 		hid_io_error(hid);
+ 		return;
+ 	default:		/* error */
 -		warn("input irq status %d received", urb->status);
++		dev_warn(&urb->dev->dev, "input irq status %d "
++			 "received\n", urb->status);
  	}
  
  	status = usb_submit_urb(urb, GFP_ATOMIC);
@@@ -320,18 -311,17 +312,18 @@@ static void hid_irq_out(struct urb *urb
  	int unplug = 0;
  
  	switch (urb->status) {
- 		case 0:			/* success */
- 			break;
- 		case -ESHUTDOWN:	/* unplug */
- 			unplug = 1;
- 		case -EILSEQ:		/* protocol error or unplug */
- 		case -EPROTO:		/* protocol error or unplug */
- 		case -ECONNRESET:	/* unlink */
- 		case -ENOENT:
- 			break;
- 		default:		/* error */
- 			dev_warn(&urb->dev->dev, "output irq status %d "
- 				 "received\n", urb->status);
+ 	case 0:			/* success */
+ 		break;
+ 	case -ESHUTDOWN:	/* unplug */
+ 		unplug = 1;
+ 	case -EILSEQ:		/* protocol error or unplug */
+ 	case -EPROTO:		/* protocol error or unplug */
+ 	case -ECONNRESET:	/* unlink */
+ 	case -ENOENT:
+ 		break;
+ 	default:		/* error */
 -		warn("output irq status %d received", urb->status);
++		dev_warn(&urb->dev->dev, "output irq status %d "
++			 "received\n", urb->status);
  	}
  
  	spin_lock_irqsave(&usbhid->outlock, flags);
@@@ -369,22 -359,22 +361,23 @@@ static void hid_ctrl(struct urb *urb
  	spin_lock_irqsave(&usbhid->ctrllock, flags);
  
  	switch (urb->status) {
- 		case 0:			/* success */
- 			if (usbhid->ctrl[usbhid->ctrltail].dir == USB_DIR_IN)
- 				hid_input_report(urb->context, usbhid->ctrl[usbhid->ctrltail].report->type,
- 						urb->transfer_buffer, urb->actual_length, 0);
- 			break;
- 		case -ESHUTDOWN:	/* unplug */
- 			unplug = 1;
- 		case -EILSEQ:		/* protocol error or unplug */
- 		case -EPROTO:		/* protocol error or unplug */
- 		case -ECONNRESET:	/* unlink */
- 		case -ENOENT:
- 		case -EPIPE:		/* report not available */
- 			break;
- 		default:		/* error */
- 			dev_warn(&urb->dev->dev, "ctrl urb status %d "
- 				 "received\n", urb->status);
+ 	case 0:			/* success */
+ 		if (usbhid->ctrl[usbhid->ctrltail].dir == USB_DIR_IN)
+ 			hid_input_report(urb->context,
+ 				usbhid->ctrl[usbhid->ctrltail].report->type,
+ 				urb->transfer_buffer, urb->actual_length, 0);
+ 		break;
+ 	case -ESHUTDOWN:	/* unplug */
+ 		unplug = 1;
+ 	case -EILSEQ:		/* protocol error or unplug */
+ 	case -EPROTO:		/* protocol error or unplug */
+ 	case -ECONNRESET:	/* unlink */
+ 	case -ENOENT:
+ 	case -EPIPE:		/* report not available */
+ 		break;
+ 	default:		/* error */
 -		warn("ctrl urb status %d received", urb->status);
++		dev_warn(&urb->dev->dev, "ctrl urb status %d "
++			 "received\n", urb->status);
  	}
  
  	if (unplug)

Greg's partial patch:

From: Greg Kroah-Hartman <gregkh@suse.de>

USB/hid-core: remove warn() macro from usb.h
    
USB should not be having it's own printk macros, so remove warn() and
use the system-wide standard of dev_warn() wherever possible.  In the
few places that will not work out, use a basic printk().

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 27fe4d8..1096502 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -221,7 +221,8 @@ static void hid_irq_in(struct urb *urb)
 			hid_io_error(hid);
 			return;
 		default:		/* error */
-			warn("input irq status %d received", urb->status);
+			dev_warn(&urb->dev->dev, "input irq status %d "
+				 "received\n", urb->status);
 	}
 
 	status = usb_submit_urb(urb, GFP_ATOMIC);
@@ -329,7 +330,8 @@ static void hid_irq_out(struct urb *urb)
 		case -ENOENT:
 			break;
 		default:		/* error */
-			warn("output irq status %d received", urb->status);
+			dev_warn(&urb->dev->dev, "output irq status %d "
+				 "received\n", urb->status);
 	}
 
 	spin_lock_irqsave(&usbhid->outlock, flags);
@@ -381,7 +383,8 @@ static void hid_ctrl(struct urb *urb)
 		case -EPIPE:		/* report not available */
 			break;
 		default:		/* error */
-			warn("ctrl urb status %d received", urb->status);
+			dev_warn(&urb->dev->dev, "ctrl urb status %d "
+				 "received\n", urb->status);
 	}
 
 	if (unplug)
@@ -418,7 +421,7 @@ void usbhid_submit_report(struct hid_device *hid, struct hid_report *report, uns
 
 		if ((head = (usbhid->outhead + 1) & (HID_OUTPUT_FIFO_SIZE - 1)) == usbhid->outtail) {
 			spin_unlock_irqrestore(&usbhid->outlock, flags);
-			warn("output queue full");
+			dev_warn(hid->dev, "output queue full\n");
 			return;
 		}
 
@@ -437,7 +440,7 @@ void usbhid_submit_report(struct hid_device *hid, struct hid_report *report, uns
 
 	if ((head = (usbhid->ctrlhead + 1) & (HID_CONTROL_FIFO_SIZE - 1)) == usbhid->ctrltail) {
 		spin_unlock_irqrestore(&usbhid->ctrllock, flags);
-		warn("control queue full");
+		dev_warn(hid->dev, "control queue full\n");
 		return;
 	}
 
@@ -465,7 +468,7 @@ static int usb_hidinput_input_event(struct input_dev *dev, unsigned int type, un
 		return -1;
 
 	if ((offset = hidinput_find_field(hid, type, code, &field)) == -1) {
-		warn("event field not found");
+		dev_warn(&dev->dev, "event field not found\n");
 		return -1;
 	}
 
@@ -568,7 +571,7 @@ void usbhid_init_reports(struct hid_device *hid)
 	}
 
 	if (err)
-		warn("timeout initializing reports");
+		dev_warn(hid->dev, "timeout initializing reports\n");
 }
 
 /*

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

end of thread, other threads:[~2008-10-16 23:28 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-16  3:49 linux-next: manual merge of the hid tree Stephen Rothwell
2008-10-16  9:34 ` Jiri Kosina
2008-10-16 23:27   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2008-10-14  6:51 Stephen Rothwell
2008-10-14  7:12 ` Jiri Kosina
2008-10-14 13:54   ` Greg KH
2008-08-25  4:46 Stephen Rothwell
2008-08-25 15:50 ` Dmitry Torokhov
2008-08-25 23:40   ` Stephen Rothwell
2008-08-27  3:10     ` Stephen Rothwell
2008-08-27 10:45       ` Jiri Kosina
2008-08-27 11:35         ` Stephen Rothwell
2008-08-25  4:26 Stephen Rothwell
2008-08-25  4:49 ` Greg KH
2008-08-25  6:26   ` Stephen Rothwell
2008-08-26  8:50   ` Jiri Kosina
2008-08-26 12:42     ` Stephen Rothwell

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