USB: Add USB_DEVICE_INTERFACE_PROTOCOL macro

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f836ac808f031e84d7d73a3540f30f38036bb41e
Commit: f836ac808f031e84d7d73a3540f30f38036bb41e
Parent: 71780f59e127bb281a9302d430495ca9586c14e7
Author: Jan Kratochvil [EMAIL PROTECTED]
AuthorDate: Wed May 9 00:26:15 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:14 2007 -0400

USB: Add USB_DEVICE_INTERFACE_PROTOCOL macro

The USB_DEVICE_INTERFACE_PROTOCOL will allow to match one interface
protocol of vendor specific device. This macro is used in patch adding
support for xbox360 to xpad.c

Signed-off-by: Jan Kratochvil [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 include/linux/usb.h |   16 
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/include/linux/usb.h b/include/linux/usb.h
index 94bd38a..56aa2ee 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -729,6 +729,22 @@ static inline int usb_endpoint_is_isoc_out(const struct 
usb_endpoint_descriptor
.bcdDevice_lo = (lo), .bcdDevice_hi = (hi)
 
 /**
+ * USB_DEVICE_INTERFACE_PROTOCOL - macro used to describe a usb
+ * device with a specific interface protocol
+ * @vend: the 16 bit USB Vendor ID
+ * @prod: the 16 bit USB Product ID
+ * @pr: bInterfaceProtocol value
+ *
+ * This macro is used to create a struct usb_device_id that matches a
+ * specific interface protocol of devices.
+ */
+#define USB_DEVICE_INTERFACE_PROTOCOL(vend,prod,pr) \
+   .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 
USB_DEVICE_ID_MATCH_INT_PROTOCOL, \
+   .idVendor = (vend), \
+   .idProduct = (prod), \
+   .bInterfaceProtocol = (pr)
+
+/**
  * USB_DEVICE_INFO - macro used to describe a class of usb devices
  * @cl: bDeviceClass value
  * @sc: bDeviceSubClass value
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: xpad - add support for Xbox 360 gamepad

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c7d9f7eb30dccf601cbdc67d5bd452f54ce90ce4
Commit: c7d9f7eb30dccf601cbdc67d5bd452f54ce90ce4
Parent: f836ac808f031e84d7d73a3540f30f38036bb41e
Author: Jan Kratochvil [EMAIL PROTECTED]
AuthorDate: Wed May 9 00:27:37 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:15 2007 -0400

Input: xpad - add support for Xbox 360 gamepad

Xbox 360 gamepad is slightly different then the previous model so it has
its own version of process_packet method. Detection of this new device
relies on USB_DEVICE_INTERFACE_PROTOCOL macro. This device got vendor
specific subclass so it can't be matched with USB_INTERFACE_INFO and
we need only one interface protocol from four availaible. It means
USB_DEVICE can't be used either.

Added xpad360_btn structure with additional buttons for x360 gamepad.
Added xtype into xpad_device structure to distinguish between different
types of xbox devices.

Signed-off-by: Jan Kratochvil [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/joystick/xpad.c |  151 +++-
 1 files changed, 117 insertions(+), 34 deletions(-)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 8c8cd95..f21f84a 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -8,6 +8,7 @@
  *Ivan Hawkes [EMAIL PROTECTED]
  *   2005 Dominic Cerquetti [EMAIL PROTECTED]
  *   2006 Adam Buchbinder [EMAIL PROTECTED]
+ *   2007 Jan Kratochvil [EMAIL PROTECTED]
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -28,6 +29,7 @@
  *  - information from http://euc.jp/periphs/xbox-controller.ja.html
  *  - the iForce driverdrivers/char/joystick/iforce.c
  *  - the skeleton-driver  drivers/usb/usb-skeleton.c
+ *  - Xbox 360 information http://www.free60.org/wiki/Gamepad
  *
  * Thanks to:
  *  - ITO Takayuki for providing essential xpad information on his website
@@ -88,6 +90,9 @@
 #define MAP_DPAD_TO_AXES   1
 #define MAP_DPAD_UNKNOWN   -1
 
+#define XTYPE_XBOX0
+#define XTYPE_XBOX360 1
+
 static int dpad_to_buttons;
 module_param(dpad_to_buttons, bool, S_IRUGO);
 MODULE_PARM_DESC(dpad_to_buttons, Map D-PAD to buttons rather than axes for 
unknown pads);
@@ -97,40 +102,42 @@ static const struct xpad_device {
u16 idProduct;
char *name;
u8 dpad_mapping;
+   u8 xtype;
 } xpad_device[] = {
-   { 0x045e, 0x0202, Microsoft X-Box pad v1 (US), MAP_DPAD_TO_AXES },
-   { 0x045e, 0x0289, Microsoft X-Box pad v2 (US), MAP_DPAD_TO_AXES },
-   { 0x045e, 0x0285, Microsoft X-Box pad (Japan), MAP_DPAD_TO_AXES },
-   { 0x045e, 0x0287, Microsoft Xbox Controller S, MAP_DPAD_TO_AXES },
-   { 0x0c12, 0x8809, RedOctane Xbox Dance Pad, MAP_DPAD_TO_BUTTONS },
-   { 0x044f, 0x0f07, Thrustmaster, Inc. Controller, MAP_DPAD_TO_AXES },
-   { 0x046d, 0xca84, Logitech Xbox Cordless Controller, MAP_DPAD_TO_AXES 
},
-   { 0x046d, 0xca88, Logitech Compact Controller for Xbox, 
MAP_DPAD_TO_AXES },
-   { 0x05fd, 0x1007, Mad Catz Controller (unverified), MAP_DPAD_TO_AXES 
},
-   { 0x05fd, 0x107a, InterAct 'PowerPad Pro' X-Box pad (Germany), 
MAP_DPAD_TO_AXES },
-   { 0x0738, 0x4516, Mad Catz Control Pad, MAP_DPAD_TO_AXES },
-   { 0x0738, 0x4522, Mad Catz LumiCON, MAP_DPAD_TO_AXES },
-   { 0x0738, 0x4526, Mad Catz Control Pad Pro, MAP_DPAD_TO_AXES },
-   { 0x0738, 0x4536, Mad Catz MicroCON, MAP_DPAD_TO_AXES },
-   { 0x0738, 0x4540, Mad Catz Beat Pad, MAP_DPAD_TO_BUTTONS },
-   { 0x0738, 0x4556, Mad Catz Lynx Wireless Controller, MAP_DPAD_TO_AXES 
},
-   { 0x0738, 0x6040, Mad Catz Beat Pad Pro, MAP_DPAD_TO_BUTTONS },
-   { 0x0c12, 0x8802, Zeroplus Xbox Controller, MAP_DPAD_TO_AXES },
-   { 0x0c12, 0x8810, Zeroplus Xbox Controller, MAP_DPAD_TO_AXES },
-   { 0x0c12, 0x9902, HAMA VibraX - *FAULTY HARDWARE*, MAP_DPAD_TO_AXES },
-   { 0x0e4c, 0x1097, Radica Gamester Controller, MAP_DPAD_TO_AXES },
-   { 0x0e4c, 0x2390, Radica Games Jtech Controller, MAP_DPAD_TO_AXES},
-   { 0x0e6f, 0x0003, Logic3 Freebird wireless Controller, 
MAP_DPAD_TO_AXES },
-   { 0x0e6f, 0x0005, Eclipse wireless Controller, MAP_DPAD_TO_AXES },
-   { 0x0e6f, 0x0006, Edge wireless Controller, MAP_DPAD_TO_AXES },
-   { 0x0e8f, 0x0201, SmartJoy Frag Xpad/PS2 adaptor, MAP_DPAD_TO_AXES },
-   { 0x0f30, 0x0202, Joytech Advanced Controller, MAP_DPAD_TO_AXES },
-   { 0x0f30, 0x, BigBen XBMiniPad Controller, MAP_DPAD_TO_AXES },
-   { 0x102c, 0xff0c, Joytech Wireless Advanced Controller, 
MAP_DPAD_TO_AXES },
-   { 0x12ab, 0x8809, Xbox DDR dancepad, MAP_DPAD_TO_BUTTONS },
-   { 0x1430, 

Input: xpad - add Xbox360 gamepad rumble support

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e01a06e8df239de0ffd4ee37d296c7bc3f57e817
Commit: e01a06e8df239de0ffd4ee37d296c7bc3f57e817
Parent: c7d9f7eb30dccf601cbdc67d5bd452f54ce90ce4
Author: Jan Kratochvil [EMAIL PROTECTED]
AuthorDate: Wed May 9 00:27:51 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:15 2007 -0400

Input: xpad - add Xbox360 gamepad rumble support

Implementation is using force feedback support for memoryless devices.

Signed-off-by: Jan Kratochvil [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/joystick/Kconfig |7 ++
 drivers/input/joystick/xpad.c  |  125 ++-
 2 files changed, 128 insertions(+), 4 deletions(-)

diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
index b002345..12db72d 100644
--- a/drivers/input/joystick/Kconfig
+++ b/drivers/input/joystick/Kconfig
@@ -268,4 +268,11 @@ config JOYSTICK_XPAD
  To compile this driver as a module, choose M here: the
  module will be called xpad.
 
+config JOYSTICK_XPAD_FF
+   bool X-Box gamepad rumble support
+   depends on JOYSTICK_XPAD  INPUT
+   select INPUT_FF_MEMLESS
+   ---help---
+ Say Y here if you want to take advantage of xbox 360 rumble features.
+
 endif
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index f21f84a..0c04a26 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -191,6 +191,12 @@ struct usb_xpad {
unsigned char *idata;   /* input data */
dma_addr_t idata_dma;
 
+#ifdef CONFIG_JOYSTICK_XPAD_FF
+   struct urb *irq_out;/* urb for interrupt out report */
+   unsigned char *odata;   /* output data */
+   dma_addr_t odata_dma;
+#endif
+
char phys[65];  /* physical device path */
 
int dpad_mapping;   /* map d-pad to buttons or to axes */
@@ -343,7 +349,113 @@ exit:
 __FUNCTION__, retval);
 }
 
-static int xpad_open (struct input_dev *dev)
+#ifdef CONFIG_JOYSTICK_XPAD_FF
+static void xpad_irq_out(struct urb *urb)
+{
+   int retval;
+
+   switch (urb-status) {
+   case 0:
+   /* success */
+   break;
+   case -ECONNRESET:
+   case -ENOENT:
+   case -ESHUTDOWN:
+   /* this urb is terminated, clean up */
+   dbg(%s - urb shutting down with status: %d,  
__FUNCTION__, urb-status);
+   return;
+   default:
+   dbg(%s - nonzero urb status received: %d,  
__FUNCTION__, urb-status);
+   goto exit;
+   }
+
+exit:
+   retval = usb_submit_urb(urb, GFP_ATOMIC);
+   if (retval)
+   err(%s - usb_submit_urb failed with result %d,
+  __FUNCTION__, retval);
+}
+
+int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect 
*effect)
+{
+   struct usb_xpad *xpad = input_get_drvdata(dev);
+
+   if (effect-type == FF_RUMBLE) {
+   __u16 strong = effect-u.rumble.strong_magnitude;
+   __u16 weak = effect-u.rumble.weak_magnitude;
+   xpad-odata[0] = 0x00;
+   xpad-odata[1] = 0x08;
+   xpad-odata[2] = 0x00;
+   xpad-odata[3] = strong / 256;
+   xpad-odata[4] = weak / 256;
+   xpad-odata[5] = 0x00;
+   xpad-odata[6] = 0x00;
+   xpad-odata[7] = 0x00;
+   usb_submit_urb(xpad-irq_out, GFP_KERNEL);
+   }
+
+   return 0;
+}
+
+static int xpad_init_ff(struct usb_interface *intf, struct usb_xpad *xpad)
+{
+   struct usb_endpoint_descriptor *ep_irq_out;
+   int error = -ENOMEM;
+
+   if (xpad-xtype != XTYPE_XBOX360)
+   return 0;
+
+   xpad-odata = usb_buffer_alloc(xpad-udev, XPAD_PKT_LEN,
+  GFP_ATOMIC, xpad-odata_dma );
+   if (!xpad-idata)
+   goto fail1;
+
+   xpad-irq_out = usb_alloc_urb(0, GFP_KERNEL);
+   if (!xpad-irq_out)
+   goto fail2;
+
+   ep_irq_out = intf-cur_altsetting-endpoint[1].desc;
+   usb_fill_int_urb(xpad-irq_out, xpad-udev,
+usb_sndintpipe(xpad-udev, 
ep_irq_out-bEndpointAddress),
+xpad-odata, XPAD_PKT_LEN,
+xpad_irq_out, xpad, ep_irq_out-bInterval);
+   xpad-irq_out-transfer_dma = xpad-odata_dma;
+   xpad-irq_out-transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+   input_set_capability(xpad-dev, EV_FF, FF_RUMBLE);
+
+   error = input_ff_create_memless(xpad-dev, NULL, xpad_play_effect);
+   if (error)
+   goto fail2;
+
+   return 0;
+
+ fail2:usb_buffer_free(xpad-udev, XPAD_PKT_LEN, xpad-odata, 

Input: psmouse - add support for Cortron PS/2 Trackballs

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aea6a46122a0ce65a831fd93cac6d2084ac666f9
Commit: aea6a46122a0ce65a831fd93cac6d2084ac666f9
Parent: e01a06e8df239de0ffd4ee37d296c7bc3f57e817
Author: Aristeu Rozanski [EMAIL PROTECTED]
AuthorDate: Thu May 10 01:47:18 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:15 2007 -0400

Input: psmouse - add support for Cortron PS/2 Trackballs

Cortron PS/2 Trackballs (700-0001A) report the 4th button using the 4th
bit of the first packet (yes, it breaks the standard PS/2 protocol).
This patch adds an extra protocol to generate BTN_SIDE based on the 4th
bit. There's no way to detect those trackballs using any kind of special
sequence, thus the protocol must be activated explicitely by writing
into 'protocol' sysfs attribute:

echo -n cortps  /sys/devices/platform/i8042/serio1/protocol

Signed-off-by: Aristeu Rozanski [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/mouse/psmouse-base.c |   29 +
 drivers/input/mouse/psmouse.h  |1 +
 2 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/drivers/input/mouse/psmouse-base.c 
b/drivers/input/mouse/psmouse-base.c
index f15f695..b9f0fb2 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -178,6 +178,15 @@ static psmouse_ret_t psmouse_process_byte(struct psmouse 
*psmouse)
}
 
 /*
+ * Cortron PS2 Trackball reports SIDE button on the 4th bit of the first
+ * byte.
+ */
+   if (psmouse-type == PSMOUSE_CORTRON) {
+   input_report_key(dev, BTN_SIDE, (packet[0]  3)  1);
+   packet[0] |= 0x08;
+   }
+
+/*
  * Generic PS/2 Mouse
  */
 
@@ -539,6 +548,20 @@ static int ps2bare_detect(struct psmouse *psmouse, int 
set_properties)
return 0;
 }
 
+/*
+ * Cortron PS/2 protocol detection. There's no special way to detect it, so it
+ * must be forced by sysfs protocol writing.
+ */
+static int cortron_detect(struct psmouse *psmouse, int set_properties)
+{
+   if (set_properties) {
+   psmouse-vendor = Cortron;
+   psmouse-name = PS/2 Trackball;
+   set_bit(BTN_SIDE, psmouse-dev-keybit);
+   }
+
+   return 0;
+}
 
 /*
  * psmouse_extensions() probes for any extensions to the basic PS/2 protocol
@@ -740,6 +763,12 @@ static const struct psmouse_protocol psmouse_protocols[] = 
{
},
 #endif
{
+   .type   = PSMOUSE_CORTRON,
+   .name   = CortronPS/2,
+   .alias  = cortps,
+   .detect = cortron_detect,
+   },
+   {
.type   = PSMOUSE_AUTO,
.name   = auto,
.alias  = any,
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
index 3964e8a..27a6883 100644
--- a/drivers/input/mouse/psmouse.h
+++ b/drivers/input/mouse/psmouse.h
@@ -88,6 +88,7 @@ enum psmouse_type {
PSMOUSE_LIFEBOOK,
PSMOUSE_TRACKPOINT,
PSMOUSE_TOUCHKIT_PS2,
+   PSMOUSE_CORTRON,
PSMOUSE_AUTO/* This one should always be last */
 };
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - remove vendor and product attributes from sysfs

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5c659c62f9f60633a8de17bd17afaa448f1e1d68
Commit: 5c659c62f9f60633a8de17bd17afaa448f1e1d68
Parent: 9b40ed088bb14ebed30540b19d5c417dc4d9d528
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:17:22 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:15 2007 -0400

Input: aiptek - remove vendor and product attributes from sysfs

They are already exported by input core; there is no need to do it twice.

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |   73 -
 1 files changed, 0 insertions(+), 73 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index c4df4f7..f9a5f87 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -1023,71 +1023,6 @@ static ssize_t show_tabletSize(struct device *dev, 
struct device_attribute *attr
 static DEVICE_ATTR(size, S_IRUGO, show_tabletSize, NULL);
 
 /***
- * support routines for the 'product_id' file
- */
-static ssize_t show_tabletProductId(struct device *dev, struct 
device_attribute *attr, char *buf)
-{
-   struct aiptek *aiptek = dev_get_drvdata(dev);
-
-   if (aiptek == NULL)
-   return 0;
-
-   return snprintf(buf, PAGE_SIZE, 0x%04x\n,
-   aiptek-inputdev-id.product);
-}
-
-static DEVICE_ATTR(product_id, S_IRUGO, show_tabletProductId, NULL);
-
-/***
- * support routines for the 'vendor_id' file
- */
-static ssize_t show_tabletVendorId(struct device *dev, struct device_attribute 
*attr, char *buf)
-{
-   struct aiptek *aiptek = dev_get_drvdata(dev);
-
-   if (aiptek == NULL)
-   return 0;
-
-   return snprintf(buf, PAGE_SIZE, 0x%04x\n, 
aiptek-inputdev-id.vendor);
-}
-
-static DEVICE_ATTR(vendor_id, S_IRUGO, show_tabletVendorId, NULL);
-
-/***
- * support routines for the 'vendor' file
- */
-static ssize_t show_tabletManufacturer(struct device *dev, struct 
device_attribute *attr, char *buf)
-{
-   struct aiptek *aiptek = dev_get_drvdata(dev);
-   int retval;
-
-   if (aiptek == NULL)
-   return 0;
-
-   retval = snprintf(buf, PAGE_SIZE, %s\n, aiptek-usbdev-manufacturer);
-   return retval;
-}
-
-static DEVICE_ATTR(vendor, S_IRUGO, show_tabletManufacturer, NULL);
-
-/***
- * support routines for the 'product' file
- */
-static ssize_t show_tabletProduct(struct device *dev, struct device_attribute 
*attr, char *buf)
-{
-   struct aiptek *aiptek = dev_get_drvdata(dev);
-   int retval;
-
-   if (aiptek == NULL)
-   return 0;
-
-   retval = snprintf(buf, PAGE_SIZE, %s\n, aiptek-usbdev-product);
-   return retval;
-}
-
-static DEVICE_ATTR(product, S_IRUGO, show_tabletProduct, NULL);
-
-/***
  * support routines for the 'pointer_mode' file. Note that this file
  * both displays current setting and allows reprogramming.
  */
@@ -1867,10 +1802,6 @@ static DEVICE_ATTR(firmware_code, S_IRUGO, 
show_firmwareCode, NULL);
 static void aiptek_delete_files(struct device *dev)
 {
device_remove_file(dev, dev_attr_size);
-   device_remove_file(dev, dev_attr_product_id);
-   device_remove_file(dev, dev_attr_vendor_id);
-   device_remove_file(dev, dev_attr_vendor);
-   device_remove_file(dev, dev_attr_product);
device_remove_file(dev, dev_attr_pointer_mode);
device_remove_file(dev, dev_attr_coordinate_mode);
device_remove_file(dev, dev_attr_tool_mode);
@@ -1901,10 +1832,6 @@ static int aiptek_add_files(struct device *dev)
int ret;
 
if ((ret = device_create_file(dev, dev_attr_size)) ||
-   (ret = device_create_file(dev, dev_attr_product_id)) ||
-   (ret = device_create_file(dev, dev_attr_vendor_id)) ||
-   (ret = device_create_file(dev, dev_attr_vendor)) ||
-   (ret = device_create_file(dev, dev_attr_product)) ||
(ret = device_create_file(dev, dev_attr_pointer_mode)) ||
(ret = device_create_file(dev, dev_attr_coordinate_mode)) ||
(ret = device_create_file(dev, dev_attr_tool_mode)) ||
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - use attribute group

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b087e1f3ee9ae4da49fdeca2b0f0f8fc5a886a79
Commit: b087e1f3ee9ae4da49fdeca2b0f0f8fc5a886a79
Parent: 5c659c62f9f60633a8de17bd17afaa448f1e1d68
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:17:37 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:15 2007 -0400

Input: aiptek - use attribute group

Use attribute group to simplify error handling and reduce code.

[Rene: add missing NULL to properly terminate aiptek_attributes]

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |  109 +++--
 1 files changed, 40 insertions(+), 69 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index f9a5f87..088da86 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -1795,67 +1795,33 @@ static ssize_t show_firmwareCode(struct device *dev, 
struct device_attribute *at
 
 static DEVICE_ATTR(firmware_code, S_IRUGO, show_firmwareCode, NULL);
 
-/***
- * This routine removes all existing sysfs files managed by this device
- * driver.
- */
-static void aiptek_delete_files(struct device *dev)
-{
-   device_remove_file(dev, dev_attr_size);
-   device_remove_file(dev, dev_attr_pointer_mode);
-   device_remove_file(dev, dev_attr_coordinate_mode);
-   device_remove_file(dev, dev_attr_tool_mode);
-   device_remove_file(dev, dev_attr_xtilt);
-   device_remove_file(dev, dev_attr_ytilt);
-   device_remove_file(dev, dev_attr_jitter);
-   device_remove_file(dev, dev_attr_delay);
-   device_remove_file(dev, dev_attr_event_count);
-   device_remove_file(dev, dev_attr_diagnostic);
-   device_remove_file(dev, dev_attr_odm_code);
-   device_remove_file(dev, dev_attr_model_code);
-   device_remove_file(dev, dev_attr_firmware_code);
-   device_remove_file(dev, dev_attr_stylus_lower);
-   device_remove_file(dev, dev_attr_stylus_upper);
-   device_remove_file(dev, dev_attr_mouse_left);
-   device_remove_file(dev, dev_attr_mouse_middle);
-   device_remove_file(dev, dev_attr_mouse_right);
-   device_remove_file(dev, dev_attr_wheel);
-   device_remove_file(dev, dev_attr_execute);
-}
-
-/***
- * This routine creates the sysfs files managed by this device
- * driver.
- */
-static int aiptek_add_files(struct device *dev)
-{
-   int ret;
+static struct attribute *aiptek_attributes[] = {
+   dev_attr_size.attr,
+   dev_attr_pointer_mode.attr,
+   dev_attr_coordinate_mode.attr,
+   dev_attr_tool_mode.attr,
+   dev_attr_xtilt.attr,
+   dev_attr_ytilt.attr,
+   dev_attr_jitter.attr,
+   dev_attr_delay.attr,
+   dev_attr_event_count.attr,
+   dev_attr_diagnostic.attr,
+   dev_attr_odm_code.attr,
+   dev_attr_model_code.attr,
+   dev_attr_firmware_code.attr,
+   dev_attr_stylus_lower.attr,
+   dev_attr_stylus_upper.attr,
+   dev_attr_mouse_left.attr,
+   dev_attr_mouse_middle.attr,
+   dev_attr_mouse_right.attr,
+   dev_attr_wheel.attr,
+   dev_attr_execute.attr,
+   NULL
+};
 
-   if ((ret = device_create_file(dev, dev_attr_size)) ||
-   (ret = device_create_file(dev, dev_attr_pointer_mode)) ||
-   (ret = device_create_file(dev, dev_attr_coordinate_mode)) ||
-   (ret = device_create_file(dev, dev_attr_tool_mode)) ||
-   (ret = device_create_file(dev, dev_attr_xtilt)) ||
-   (ret = device_create_file(dev, dev_attr_ytilt)) ||
-   (ret = device_create_file(dev, dev_attr_jitter)) ||
-   (ret = device_create_file(dev, dev_attr_delay)) ||
-   (ret = device_create_file(dev, dev_attr_event_count)) ||
-   (ret = device_create_file(dev, dev_attr_diagnostic)) ||
-   (ret = device_create_file(dev, dev_attr_odm_code)) ||
-   (ret = device_create_file(dev, dev_attr_model_code)) ||
-   (ret = device_create_file(dev, dev_attr_firmware_code)) ||
-   (ret = device_create_file(dev, dev_attr_stylus_lower)) ||
-   (ret = device_create_file(dev, dev_attr_stylus_upper)) ||
-   (ret = device_create_file(dev, dev_attr_mouse_left)) ||
-   (ret = device_create_file(dev, dev_attr_mouse_middle)) ||
-   (ret = device_create_file(dev, dev_attr_mouse_right)) ||
-   (ret = device_create_file(dev, dev_attr_wheel)) ||
-   (ret = device_create_file(dev, dev_attr_execute))) {
-   err(aiptek: killing own sysfs device files\n);
-   aiptek_delete_files(dev);
-   }
-   return ret;
-}
+static struct attribute_group aiptek_attribute_group = {
+  

Input: aiptek - do not check for NULL in attribute methods

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=02fb6c385c72823af4fac83963a05be9163c73ea
Commit: 02fb6c385c72823af4fac83963a05be9163c73ea
Parent: b087e1f3ee9ae4da49fdeca2b0f0f8fc5a886a79
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:17:44 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:15 2007 -0400

Input: aiptek - do not check for NULL in attribute methods

It makes no sense to check for NULL in attribute methods -
we do usb_set_intfdata before creating attributes and once
attributes have been removed we are guaranteed to not be
called.

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |  101 -
 1 files changed, 0 insertions(+), 101 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 088da86..274c12f 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -1006,9 +1006,6 @@ static ssize_t show_tabletSize(struct device *dev, struct 
device_attribute *attr
 {
struct aiptek *aiptek = dev_get_drvdata(dev);
 
-   if (aiptek == NULL)
-   return 0;
-
return snprintf(buf, PAGE_SIZE, %dx%d\n,
aiptek-inputdev-absmax[ABS_X] + 1,
aiptek-inputdev-absmax[ABS_Y] + 1);
@@ -1031,9 +1028,6 @@ static ssize_t show_tabletPointerMode(struct device *dev, 
struct device_attribut
struct aiptek *aiptek = dev_get_drvdata(dev);
char *s;
 
-   if (aiptek == NULL)
-   return 0;
-
switch (aiptek-curSetting.pointerMode) {
case AIPTEK_POINTER_ONLY_STYLUS_MODE:
s = stylus;
@@ -1058,8 +1052,6 @@ static ssize_t
 store_tabletPointerMode(struct device *dev, struct device_attribute *attr, 
const char *buf, size_t count)
 {
struct aiptek *aiptek = dev_get_drvdata(dev);
-   if (aiptek == NULL)
-   return 0;
 
if (strcmp(buf, stylus) == 0) {
aiptek-newSetting.pointerMode =
@@ -1085,9 +1077,6 @@ static ssize_t show_tabletCoordinateMode(struct device 
*dev, struct device_attri
struct aiptek *aiptek = dev_get_drvdata(dev);
char *s;
 
-   if (aiptek == NULL)
-   return 0;
-
switch (aiptek-curSetting.coordinateMode) {
case AIPTEK_COORDINATE_ABSOLUTE_MODE:
s = absolute;
@@ -1108,8 +1097,6 @@ static ssize_t
 store_tabletCoordinateMode(struct device *dev, struct device_attribute *attr, 
const char *buf, size_t count)
 {
struct aiptek *aiptek = dev_get_drvdata(dev);
-   if (aiptek == NULL)
-   return 0;
 
if (strcmp(buf, absolute) == 0) {
aiptek-newSetting.pointerMode =
@@ -1134,9 +1121,6 @@ static ssize_t show_tabletToolMode(struct device *dev, 
struct device_attribute *
struct aiptek *aiptek = dev_get_drvdata(dev);
char *s;
 
-   if (aiptek == NULL)
-   return 0;
-
switch (TOOL_BUTTON(aiptek-curSetting.toolMode)) {
case AIPTEK_TOOL_BUTTON_MOUSE_MODE:
s = mouse;
@@ -1177,8 +1161,6 @@ static ssize_t
 store_tabletToolMode(struct device *dev, struct device_attribute *attr, const 
char *buf, size_t count)
 {
struct aiptek *aiptek = dev_get_drvdata(dev);
-   if (aiptek == NULL)
-   return 0;
 
if (strcmp(buf, mouse) == 0) {
aiptek-newSetting.toolMode = AIPTEK_TOOL_BUTTON_MOUSE_MODE;
@@ -1211,9 +1193,6 @@ static ssize_t show_tabletXtilt(struct device *dev, 
struct device_attribute *att
 {
struct aiptek *aiptek = dev_get_drvdata(dev);
 
-   if (aiptek == NULL)
-   return 0;
-
if (aiptek-curSetting.xTilt == AIPTEK_TILT_DISABLE) {
return snprintf(buf, PAGE_SIZE, disable\n);
} else {
@@ -1228,9 +1207,6 @@ store_tabletXtilt(struct device *dev, struct 
device_attribute *attr, const char
struct aiptek *aiptek = dev_get_drvdata(dev);
int x;
 
-   if (aiptek == NULL)
-   return 0;
-
if (strcmp(buf, disable) == 0) {
aiptek-newSetting.xTilt = AIPTEK_TILT_DISABLE;
} else {
@@ -1253,9 +1229,6 @@ static ssize_t show_tabletYtilt(struct device *dev, 
struct device_attribute *att
 {
struct aiptek *aiptek = dev_get_drvdata(dev);
 
-   if (aiptek == NULL)
-   return 0;
-
if (aiptek-curSetting.yTilt == AIPTEK_TILT_DISABLE) {
return snprintf(buf, PAGE_SIZE, disable\n);
} else {
@@ -1270,9 +1243,6 @@ store_tabletYtilt(struct device *dev, struct 
device_attribute *attr, const char
struct aiptek *aiptek = dev_get_drvdata(dev);
int y;
 
-   if (aiptek == NULL)
-   return 0;
-
if (strcmp(buf, disable) == 0) {
   

Input: aiptek - use maps in attributes

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cd438a58c89221d8642455d0cc8ec96d3b822f6e
Commit: cd438a58c89221d8642455d0cc8ec96d3b822f6e
Parent: 02fb6c385c72823af4fac83963a05be9163c73ea
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:17:57 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:15 2007 -0400

Input: aiptek - use maps in attributes

Use maps to convert for strings to internal constants and vice versa
in aiptek's sysfs attribute methods instead of open-coding it. This
results in smaller code that is also easier to maintain.

[Rene: fix a typo - stylys instead of stylus]

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |  362 -
 1 files changed, 138 insertions(+), 224 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 274c12f..0c990e6 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -344,6 +344,39 @@ static const int macroKeyEvents[] = {
 };
 
 /***
+ * Map values to strings and back. Every map shoudl have the following
+ * as its last element: { NULL, AIPTEK_INVALID_VALUE }.
+ */
+#define AIPTEK_INVALID_VALUE   -1
+
+struct aiptek_map {
+   const char *string;
+   int value;
+};
+
+static int map_str_to_val(const struct aiptek_map *map, const char *str, 
size_t count)
+{
+   const struct aiptek_map *p;
+
+   for (p = map; p-string; p++)
+   if (!strncmp(str, p-string, count))
+   return p-value;
+
+   return AIPTEK_INVALID_VALUE;
+}
+
+static const char *map_val_to_str(const struct aiptek_map *map, int val)
+{
+   const struct aiptek_map *p;
+
+   for (p = map; p-value != AIPTEK_INVALID_VALUE; p++)
+   if (val == p-value)
+   return p-string;
+
+   return unknown;
+}
+
+/***
  * Relative reports deliver values in 2's complement format to
  * deal with negative offsets.
  */
@@ -1023,44 +1056,32 @@ static DEVICE_ATTR(size, S_IRUGO, show_tabletSize, 
NULL);
  * support routines for the 'pointer_mode' file. Note that this file
  * both displays current setting and allows reprogramming.
  */
+static struct aiptek_map pointer_mode_map[] = {
+   { stylus, AIPTEK_POINTER_ONLY_STYLUS_MODE },
+   { mouse,  AIPTEK_POINTER_ONLY_MOUSE_MODE },
+   { either, AIPTEK_POINTER_EITHER_MODE },
+   { NULL, AIPTEK_INVALID_VALUE }
+};
+
 static ssize_t show_tabletPointerMode(struct device *dev, struct 
device_attribute *attr, char *buf)
 {
struct aiptek *aiptek = dev_get_drvdata(dev);
-   char *s;
-
-   switch (aiptek-curSetting.pointerMode) {
-   case AIPTEK_POINTER_ONLY_STYLUS_MODE:
-   s = stylus;
-   break;
-
-   case AIPTEK_POINTER_ONLY_MOUSE_MODE:
-   s = mouse;
-   break;
-
-   case AIPTEK_POINTER_EITHER_MODE:
-   s = either;
-   break;
 
-   default:
-   s = unknown;
-   break;
-   }
-   return snprintf(buf, PAGE_SIZE, %s\n, s);
+   return snprintf(buf, PAGE_SIZE, %s\n,
+   map_val_to_str(pointer_mode_map,
+   aiptek-curSetting.pointerMode));
 }
 
 static ssize_t
 store_tabletPointerMode(struct device *dev, struct device_attribute *attr, 
const char *buf, size_t count)
 {
struct aiptek *aiptek = dev_get_drvdata(dev);
+   int new_mode = map_str_to_val(pointer_mode_map, buf, count);
 
-   if (strcmp(buf, stylus) == 0) {
-   aiptek-newSetting.pointerMode =
-   AIPTEK_POINTER_ONLY_STYLUS_MODE;
-   } else if (strcmp(buf, mouse) == 0) {
-   aiptek-newSetting.pointerMode = AIPTEK_POINTER_ONLY_MOUSE_MODE;
-   } else if (strcmp(buf, either) == 0) {
-   aiptek-newSetting.pointerMode = AIPTEK_POINTER_EITHER_MODE;
-   }
+   if (new_mode == AIPTEK_INVALID_VALUE)
+   return -EINVAL;
+
+   aiptek-newSetting.pointerMode = new_mode;
return count;
 }
 
@@ -1072,39 +1093,32 @@ static DEVICE_ATTR(pointer_mode,
  * support routines for the 'coordinate_mode' file. Note that this file
  * both displays current setting and allows reprogramming.
  */
+
+static struct aiptek_map coordinate_mode_map[] = {
+   { absolute,   AIPTEK_COORDINATE_ABSOLUTE_MODE },
+   { relative,   AIPTEK_COORDINATE_RELATIVE_MODE },
+   { NULL, AIPTEK_INVALID_VALUE }
+};
+
 static ssize_t show_tabletCoordinateMode(struct device *dev, struct 
device_attribute *attr, char *buf)
 {
struct aiptek *aiptek = 

Input: aiptek - kill aiptek_convert_from_2s_complement()

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=37767b66ed61ee37f0d8f40523f74c31bc187d1d
Commit: 37767b66ed61ee37f0d8f40523f74c31bc187d1d
Parent: cd438a58c89221d8642455d0cc8ec96d3b822f6e
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:18:08 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:16 2007 -0400

Input: aiptek - kill aiptek_convert_from_2s_complement()

There is no reason to do that, just tell the compiler that
we are dealing with signed values in buffer, that's it.

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |   24 ++--
 1 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 0c990e6..3a5e0aa 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -377,26 +377,6 @@ static const char *map_val_to_str(const struct aiptek_map 
*map, int val)
 }
 
 /***
- * Relative reports deliver values in 2's complement format to
- * deal with negative offsets.
- */
-static int aiptek_convert_from_2s_complement(unsigned char c)
-{
-   int ret;
-   unsigned char b = c;
-   int negate = 0;
-
-   if ((b  0x80) != 0) {
-   b = ~b;
-   b--;
-   negate = 1;
-   }
-   ret = b;
-   ret = (negate == 1) ? -ret : ret;
-   return ret;
-}
-
-/***
  * aiptek_irq can receive one of six potential reports.
  * The documentation for each is in the body of the function.
  *
@@ -473,8 +453,8 @@ static void aiptek_irq(struct urb *urb)
aiptek-diagnostic =
AIPTEK_DIAGNOSTIC_SENDING_RELATIVE_IN_ABSOLUTE;
} else {
-   x = aiptek_convert_from_2s_complement(data[2]);
-   y = aiptek_convert_from_2s_complement(data[3]);
+   x = (signed char) data[2];
+   y = (signed char) data[3];
 
/* jitterable keeps track of whether any button has 
been pressed.
 * We're also using it to remap the physical mouse 
button mask
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - use array to list all buttons

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=33936fa603f2524a7dde08d22637d0989a4e8fdd
Commit: 33936fa603f2524a7dde08d22637d0989a4e8fdd
Parent: 37767b66ed61ee37f0d8f40523f74c31bc187d1d
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:18:15 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:16 2007 -0400

Input: aiptek - use array to list all buttons

When setting up input device use an array to list all the buttons
instead of setting every bit separately.

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |   29 -
 1 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 3a5e0aa..86e4893 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -329,6 +329,13 @@ struct aiptek {
unsigned char *data;/* incoming packet data 
 */
 };
 
+static const int buttonEvents[] = {
+   BTN_LEFT, BTN_RIGHT, BTN_MIDDLE,
+   BTN_TOOL_PEN, BTN_TOOL_RUBBER, BTN_TOOL_PENCIL, BTN_TOOL_AIRBRUSH,
+   BTN_TOOL_BRUSH, BTN_TOOL_MOUSE, BTN_TOOL_LENS, BTN_TOUCH,
+   BTN_STYLUS, BTN_STYLUS2,
+};
+
 /*
  * Permit easy lookup of keyboard events to send, versus
  * the bitmap which comes from the tablet. This hides the
@@ -1728,26 +1735,14 @@ aiptek_probe(struct usb_interface *intf, const struct 
usb_device_id *id)
inputdev-relbit[0] |=
(BIT(REL_X) | BIT(REL_Y) | BIT(REL_WHEEL) | BIT(REL_MISC));
 
-   inputdev-keybit[LONG(BTN_LEFT)] |=
-   (BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE));
-
-   inputdev-keybit[LONG(BTN_DIGI)] |=
-   (BIT(BTN_TOOL_PEN) |
-BIT(BTN_TOOL_RUBBER) |
-BIT(BTN_TOOL_PENCIL) |
-BIT(BTN_TOOL_AIRBRUSH) |
-BIT(BTN_TOOL_BRUSH) |
-BIT(BTN_TOOL_MOUSE) |
-BIT(BTN_TOOL_LENS) |
-BIT(BTN_TOUCH) | BIT(BTN_STYLUS) | BIT(BTN_STYLUS2));
-
inputdev-mscbit[0] = BIT(MSC_SERIAL);
 
-   /* Programming the tablet macro keys needs to be done with a for loop
-* as the keycodes are discontiguous.
-*/
+   /* Set up key and button codes */
+   for (i = 0; i  ARRAY_SIZE(buttonEvents); ++i)
+   __set_bit(buttonEvents[i], inputdev-keybit);
+
for (i = 0; i  ARRAY_SIZE(macroKeyEvents); ++i)
-   set_bit(macroKeyEvents[i], inputdev-keybit);
+   __set_bit(macroKeyEvents[i], inputdev-keybit);
 
/*
 * Program the input device coordinate capacities. We do not yet
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - correct documentation on reports

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2fe574167be6a61d5f37c496da01c4a7daa73f4d
Commit: 2fe574167be6a61d5f37c496da01c4a7daa73f4d
Parent: 33936fa603f2524a7dde08d22637d0989a4e8fdd
Author: Rene van Paassen [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:18:24 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:16 2007 -0400

Input: aiptek - correct documentation on reports

Small fix that corrects the documentation on the report byte
format produced by the mouse

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 86e4893..86a750e 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -112,7 +112,7 @@
  * (returned as Report 3 - absolute coordinates from the mouse)
  *
  *bit7  bit6  bit5  bit4  bit3  bit2  bit1  bit0
- * byte0   0 0 0 0 0 0 1 0
+ * byte0   0 0 0 0 0 0 1 1
  * byte1  X7X6X5X4X3X2X1X0
  * byte2  X15   X14   X13   X12   X11   X10   X9X8
  * byte3  Y7Y6Y5Y4Y3Y2Y1Y0
@@ -134,7 +134,7 @@
  * (returned as Report 5 - macrokeys from the mouse)
  *
  *bit7  bit6  bit5  bit4  bit3  bit2  bit1  bit0
- * byte0   0 0 0 0 0 1 0 0
+ * byte0   0 0 0 0 0 1 0 1
  * byte1   0 0 0BS2   BSTip   IRDV
  * byte2   0 0 0 0 0 0 1 0
  * byte3   0 0 0K4K3K2K1K0
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - correct the proximity and validity checks

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fe981f2340edffcb6aad2203d8f14c9bef0e67e3
Commit: fe981f2340edffcb6aad2203d8f14c9bef0e67e3
Parent: 2fe574167be6a61d5f37c496da01c4a7daa73f4d
Author: Rene van Paassen [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:31:24 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:16 2007 -0400

Input: aiptek - correct the proximity and validity checks

Calculation of proximity bit and of data valid bits were reversed for
stylus reports.

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 86a750e..5aa8abf 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -508,8 +508,8 @@ static void aiptek_irq(struct urb *urb)
y = le16_to_cpu(get_unaligned((__le16 *) (data + 3)));
z = le16_to_cpu(get_unaligned((__le16 *) (data + 6)));
 
-   p = (data[5]  0x01) != 0 ? 1 : 0;
-   dv = (data[5]  0x02) != 0 ? 1 : 0;
+   dv = (data[5]  0x01) != 0 ? 1 : 0;
+   p = (data[5]  0x02) != 0 ? 1 : 0;
tip = (data[5]  0x04) != 0 ? 1 : 0;
 
/* Use jitterable to re-arrange button masks
@@ -587,8 +587,8 @@ static void aiptek_irq(struct urb *urb)
 
jitterable = data[5]  0x1c;
 
-   p = (data[5]  0x01) != 0 ? 1 : 0;
-   dv = (data[5]  0x02) != 0 ? 1 : 0;
+   dv = (data[5]  0x01) != 0 ? 1 : 0;
+   p = (data[5]  0x02) != 0 ? 1 : 0;
left = (data[5]  aiptek-curSetting.mouseButtonLeft) 
!= 0 ? 1 : 0;
right = (data[5]  aiptek-curSetting.mouseButtonRight) 
!= 0 ? 1 : 0;
middle = (data[5]  
aiptek-curSetting.mouseButtonMiddle) != 0 ? 1 : 0;
@@ -634,8 +634,8 @@ static void aiptek_irq(struct urb *urb)
else if (data[0] == 4) {
jitterable = data[1]  0x18;
 
-   p = (data[1]  0x01) != 0 ? 1 : 0;
-   dv = (data[1]  0x02) != 0 ? 1 : 0;
+   dv = (data[1]  0x01) != 0 ? 1 : 0;
+   p = (data[1]  0x02) != 0 ? 1 : 0;
tip = (data[1]  0x04) != 0 ? 1 : 0;
bs = (data[1]  aiptek-curSetting.stylusButtonLower) != 0 ? 1 
: 0;
pck = (data[1]  aiptek-curSetting.stylusButtonUpper) != 0 ? 1 
: 0;
@@ -684,8 +684,8 @@ static void aiptek_irq(struct urb *urb)
else if (data[0] == 5) {
jitterable = data[1]  0x1c;
 
-   p = (data[1]  0x01) != 0 ? 1 : 0;
-   dv = (data[1]  0x02) != 0 ? 1 : 0;
+   dv = (data[1]  0x01) != 0 ? 1 : 0;
+   p = (data[1]  0x02) != 0 ? 1 : 0;
left = (data[1] aiptek-curSetting.mouseButtonLeft) != 0 ? 1 : 
0;
right = (data[1]  aiptek-curSetting.mouseButtonRight) != 0 ? 
1 : 0;
middle = (data[1]  aiptek-curSetting.mouseButtonMiddle) != 0 
? 1 : 0;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - fixed mouse button defines

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ce0982edaec2c46dc9ec466e03f1fe94ee0862d8
Commit: ce0982edaec2c46dc9ec466e03f1fe94ee0862d8
Parent: fe981f2340edffcb6aad2203d8f14c9bef0e67e3
Author: Rene van Paassen [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:31:45 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:16 2007 -0400

Input: aiptek - fixed mouse button defines

Mouse button defines tested the wrong bits, now fixed

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 5aa8abf..147ed34 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -264,9 +264,9 @@
 
/* Mouse button programming
 */
-#define AIPTEK_MOUSE_LEFT_BUTTON   0x01
-#define AIPTEK_MOUSE_RIGHT_BUTTON  0x02
-#define AIPTEK_MOUSE_MIDDLE_BUTTON 0x04
+#define AIPTEK_MOUSE_LEFT_BUTTON   0x04
+#define AIPTEK_MOUSE_RIGHT_BUTTON  0x08
+#define AIPTEK_MOUSE_MIDDLE_BUTTON 0x10
 
/* Stylus button programming
 */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - fix relative mode parsing

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0038cae0ffd72b75699010bd112655dc2615e2fd
Commit: 0038cae0ffd72b75699010bd112655dc2615e2fd
Parent: ce0982edaec2c46dc9ec466e03f1fe94ee0862d8
Author: Mark Vytlacil [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:31:50 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:16 2007 -0400

Input: aiptek - fix relative mode parsing

Corrections to relative mode, was looking at wrong byte

Signed-off-by: Mark Vytlacil [EMAIL PROTECTED]
Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 147ed34..c182877 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -470,18 +470,20 @@ static void aiptek_irq(struct urb *urb)
 * that a non-zero value indicates that one or more
 * mouse button was pressed.)
 */
-   jitterable = data[5]  0x07;
+   jitterable = data[1]  0x07;
 
-   left = (data[5]  aiptek-curSetting.mouseButtonLeft) 
!= 0 ? 1 : 0;
-   right = (data[5]  aiptek-curSetting.mouseButtonRight) 
!= 0 ? 1 : 0;
-   middle = (data[5]  
aiptek-curSetting.mouseButtonMiddle) != 0 ? 1 : 0;
+   left = (data[1]  aiptek-curSetting.mouseButtonLeft  
2) != 0 ? 1 : 0;
+   right = (data[1]  aiptek-curSetting.mouseButtonRight 
 2) != 0 ? 1 : 0;
+   middle = (data[1]  
aiptek-curSetting.mouseButtonMiddle  2) != 0 ? 1 : 0;
 
input_report_key(inputdev, BTN_LEFT, left);
input_report_key(inputdev, BTN_MIDDLE, middle);
input_report_key(inputdev, BTN_RIGHT, right);
+
+   input_report_abs(inputdev, ABS_MISC,
+1 | AIPTEK_REPORT_TOOL_UNKNOWN);
input_report_rel(inputdev, REL_X, x);
input_report_rel(inputdev, REL_Y, y);
-   input_report_rel(inputdev, REL_MISC, 1 | 
AIPTEK_REPORT_TOOL_UNKNOWN);
 
/* Wheel support is in the form of a single-event
 * firing.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - use set_bit instead of bitwise or

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a54f49e8989462cfc9cab0c377b2d4e60e5b70a
Commit: 1a54f49e8989462cfc9cab0c377b2d4e60e5b70a
Parent: 0038cae0ffd72b75699010bd112655dc2615e2fd
Author: Rene van Paassen [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:31:55 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:16 2007 -0400

Input: aiptek - use set_bit instead of bitwise or

Have to use set_bit since some bit values are over 32, and bitwise or
won't work on these. To be safe for the future too, use set_bit for all
input dev capabilities

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |   28 
 1 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index c182877..8c62afe 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -329,6 +329,19 @@ struct aiptek {
unsigned char *data;/* incoming packet data 
 */
 };
 
+static const int eventTypes[] = {
+EV_KEY, EV_ABS, EV_REL, EV_MSC,
+};
+
+static const int absEvents[] = {
+ABS_X, ABS_Y, ABS_PRESSURE, ABS_TILT_X, ABS_TILT_Y,
+ABS_WHEEL, ABS_MISC,
+};
+
+static const int relEvents[] = {
+REL_X, REL_Y, REL_WHEEL,
+};
+
 static const int buttonEvents[] = {
BTN_LEFT, BTN_RIGHT, BTN_MIDDLE,
BTN_TOOL_PEN, BTN_TOOL_RUBBER, BTN_TOOL_PENCIL, BTN_TOOL_AIRBRUSH,
@@ -1727,17 +1740,16 @@ aiptek_probe(struct usb_interface *intf, const struct 
usb_device_id *id)
/* Now program the capacities of the tablet, in terms of being
 * an input device.
 */
-   inputdev-evbit[0] |= BIT(EV_KEY)
-   | BIT(EV_ABS)
-   | BIT(EV_REL)
-   | BIT(EV_MSC);
+   for (i = 0; i  ARRAY_SIZE(eventTypes); ++i)
+   __set_bit(eventTypes[i], inputdev-evbit);
 
-   inputdev-absbit[0] |= BIT(ABS_MISC);
+   for (i = 0; i  ARRAY_SIZE(absEvents); ++i)
+   __set_bit(absEvents[i], inputdev-absbit);
 
-   inputdev-relbit[0] |=
-   (BIT(REL_X) | BIT(REL_Y) | BIT(REL_WHEEL) | BIT(REL_MISC));
+   for (i = 0; i  ARRAY_SIZE(relEvents); ++i)
+   __set_bit(relEvents[i], inputdev-relbit);
 
-   inputdev-mscbit[0] = BIT(MSC_SERIAL);
+   __set_bit(MSC_SERIAL, inputdev-mscbit);
 
/* Set up key and button codes */
for (i = 0; i  ARRAY_SIZE(buttonEvents); ++i)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - put sensible warnings in probe

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6125a400354c4a02b9dad0e5d8128f9dc08cfd51
Commit: 6125a400354c4a02b9dad0e5d8128f9dc08cfd51
Parent: 1a54f49e8989462cfc9cab0c377b2d4e60e5b70a
Author: Rene van Paassen [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:31:59 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:16 2007 -0400

Input: aiptek - put sensible warnings in probe

Added warnings to the points where the tablet probe may fail

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |   28 ++--
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 8c62afe..7fb15af 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -1670,17 +1670,23 @@ aiptek_probe(struct usb_interface *intf, const struct 
usb_device_id *id)
 
aiptek = kzalloc(sizeof(struct aiptek), GFP_KERNEL);
inputdev = input_allocate_device();
-   if (!aiptek || !inputdev)
+   if (!aiptek || !inputdev) {
+   warn(aiptek: cannot allocate memory or input device);
goto fail1;
+}
 
aiptek-data = usb_buffer_alloc(usbdev, AIPTEK_PACKET_LENGTH,
GFP_ATOMIC, aiptek-data_dma);
-   if (!aiptek-data)
+if (!aiptek-data) {
+   warn(aiptek: cannot allocate usb buffer);
goto fail1;
+   }
 
aiptek-urb = usb_alloc_urb(0, GFP_KERNEL);
-   if (!aiptek-urb)
+   if (!aiptek-urb) {
+   warn(aiptek: cannot allocate urb);
goto fail2;
+   }
 
aiptek-inputdev = inputdev;
aiptek-usbdev = usbdev;
@@ -1807,6 +1813,13 @@ aiptek_probe(struct usb_interface *intf, const struct 
usb_device_id *id)
}
}
 
+   /* Murphy says that some day someone will have a tablet that fails the
+  above test. That's you, Frederic Rodrigo */
+   if (i == ARRAY_SIZE(speeds)) {
+   info(input: Aiptek tried all speeds, no sane response);
+   goto fail2;
+   }
+
/* Associate this driver's struct with the usb interface.
 */
usb_set_intfdata(intf, aiptek);
@@ -1814,15 +1827,18 @@ aiptek_probe(struct usb_interface *intf, const struct 
usb_device_id *id)
/* Set up the sysfs files
 */
err = sysfs_create_group(intf-dev.kobj, aiptek_attribute_group);
-   if (err)
+   if (err) {
+   warn(aiptek: cannot create sysfs group err: %d, err);
goto fail3;
+}
 
/* Register the tablet as an Input Device
 */
err = input_register_device(aiptek-inputdev);
-   if (err)
+   if (err) {
+   warn(aiptek: input_register_device returned err: %d, err);
goto fail4;
-
+}
return 0;
 
  fail4:sysfs_remove_group(intf-dev.kobj, aiptek_attribute_group);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - use only absolute misc reports

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=da9fda434cde76dfb8174548a63b685b4ac00a9c
Commit: da9fda434cde76dfb8174548a63b685b4ac00a9c
Parent: 6125a400354c4a02b9dad0e5d8128f9dc08cfd51
Author: Rene van Paassen [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:32:03 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:16 2007 -0400

Input: aiptek - use only absolute misc reports

To get an on - off reporting for proximity, absolute misc reports are
used. The mixture of absolute and relative reports is awkward

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 7fb15af..c7db623 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -417,6 +417,9 @@ static const char *map_val_to_str(const struct aiptek_map 
*map, int val)
  * Proximity. Why two events? I thought it interesting to know if the
  * Proximity event occurred while the tablet was in absolute or relative
  * mode.
+ * Update: REL_MISC proved not to be such a good idea. With REL_MISC you
+ * get an event transmitted each time. ABS_MISC works better, since it
+ * can be set and re-set. Thus, only using ABS_MISC from now on.
  *
  * Other tablets use the notion of a certain minimum stylus pressure
  * to infer proximity. While that could have been done, that is yet
@@ -639,7 +642,7 @@ static void aiptek_irq(struct urb *urb)
aiptek-curSetting.wheel = 
AIPTEK_WHEEL_DISABLE;
}
}
-   input_report_rel(inputdev, REL_MISC, p | 
AIPTEK_REPORT_TOOL_MOUSE);
+   input_report_abs(inputdev, ABS_MISC, p | 
AIPTEK_REPORT_TOOL_MOUSE);
input_sync(inputdev);
}
}
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - correct the tool switching code

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b3b6cf1d47508a04de859d357789a3fc0cf8c690
Commit: b3b6cf1d47508a04de859d357789a3fc0cf8c690
Parent: da9fda434cde76dfb8174548a63b685b4ac00a9c
Author: Rene van Paassen [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:32:07 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:16 2007 -0400

Input: aiptek - correct the tool switching code

Now the old tool is remembered, and reset when a new tool is
selected via the sysfs files.

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |   94 ++--
 1 files changed, 52 insertions(+), 42 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index c7db623..0c78dc4 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -218,15 +218,9 @@
 #define AIPTEK_WHEEL_DISABLE   (-10101)
 
/* ToolCode values, which BTW are 0x140 .. 0x14f
-* We have things set up such that if TOOL_BUTTON_FIRED_BIT is
-* not set, we'll send one instance of AIPTEK_TOOL_BUTTON_xxx.
-*
-* Whenever the user resets the value, TOOL_BUTTON_FIRED_BIT will
-* get reset.
+* We have things set up such that if the tool button has changed,
+* the tools get reset.
 */
-#define TOOL_BUTTON(x) ((x)  0x14f)
-#define TOOL_BUTTON_FIRED(x)   ((x)  0x200)
-#define TOOL_BUTTON_FIRED_BIT  0x200
/* toolMode codes
 */
 #define AIPTEK_TOOL_BUTTON_PEN_MODEBTN_TOOL_PEN
@@ -326,6 +320,9 @@ struct aiptek {
int inDelay;/* jitter: in jitter delay? 
 */
unsigned long endDelay; /* jitter: time when delay ends 
 */
int previousJitterable; /* jitterable prev value */
+
+   int lastMacro;  /* macro key to reset   
 */
+   int previousToolMode;   /* pen, pencil, brush, etc. 
tool */
unsigned char *data;/* incoming packet data 
 */
 };
 
@@ -542,16 +539,18 @@ static void aiptek_irq(struct urb *urb)
 * all 'bad' reports...
 */
if (dv != 0) {
-   /* If we've not already sent a tool_button_?? 
code, do
-* so now. Then set FIRED_BIT so it won't be 
resent unless
-* the user forces FIRED_BIT off.
+   /* If the selected tool changed, reset the old
+* tool key, and set the new one.
 */
-   if (TOOL_BUTTON_FIRED
-   (aiptek-curSetting.toolMode) == 0) {
+   if (aiptek-previousToolMode !=
+   aiptek-curSetting.toolMode) {
+   input_report_key(inputdev,
+
aiptek-previousToolMode, 0);
input_report_key(inputdev,
-
TOOL_BUTTON(aiptek-curSetting.toolMode),
+
aiptek-curSetting.toolMode,
 1);
-   aiptek-curSetting.toolMode |= 
TOOL_BUTTON_FIRED_BIT;
+   aiptek-previousToolMode =
+ aiptek-curSetting.toolMode;
}
 
if (p != 0) {
@@ -612,16 +611,18 @@ static void aiptek_irq(struct urb *urb)
middle = (data[5]  
aiptek-curSetting.mouseButtonMiddle) != 0 ? 1 : 0;
 
if (dv != 0) {
-   /* If we've not already sent a tool_button_?? 
code, do
-* so now. Then set FIRED_BIT so it won't be 
resent unless
-* the user forces FIRED_BIT off.
+   /* If the selected tool changed, reset the old
+* tool key, and set the new one.
 */
-   if (TOOL_BUTTON_FIRED
-   (aiptek-curSetting.toolMode) == 0) {
+   if (aiptek-previousToolMode !=
+   aiptek-curSetting.toolMode) {
+   input_report_key(inputdev,
+ 

Input: aiptek - tolerate newlines in sysfs files

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0112db36ef95e5632db071297f7df130725c47b9
Commit: 0112db36ef95e5632db071297f7df130725c47b9
Parent: b3b6cf1d47508a04de859d357789a3fc0cf8c690
Author: Rene van Paassen [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:32:12 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:17 2007 -0400

Input: aiptek - tolerate newlines in sysfs files

Now echo some value  /sys/.../somefile is also acceptable.

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 0c78dc4..54c8d6f 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -375,8 +375,11 @@ static int map_str_to_val(const struct aiptek_map *map, 
const char *str, size_t
 {
const struct aiptek_map *p;
 
+   if (str[count - 1] == '\n')
+   count--;
+
for (p = map; p-string; p++)
-   if (!strncmp(str, p-string, count))
+   if (!strncmp(str, p-string, count))
return p-value;
 
return AIPTEK_INVALID_VALUE;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: aiptek - rework the function key code

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1e7b3faed1793e7637a774240ae22541c5ba6ca0
Commit: 1e7b3faed1793e7637a774240ae22541c5ba6ca0
Parent: 0112db36ef95e5632db071297f7df130725c47b9
Author: Rene van Paassen [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:32:17 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:17 2007 -0400

Input: aiptek - rework the function key code

Function keys (also called macro keys) code corrected. Using a
lastMacro variable to keep track of key currently pressed. This
ensures proper resetting when dragging the pen in the drawing
area or to another key. Also suppress sending pressure reports
when over the macro key area.

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |   97 +++-
 1 files changed, 46 insertions(+), 51 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 54c8d6f..292eb50 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -509,6 +509,11 @@ static void aiptek_irq(struct urb *urb)
 aiptek-curSetting.wheel);
aiptek-curSetting.wheel = AIPTEK_WHEEL_DISABLE;
}
+   if (aiptek-lastMacro != -1) {
+   input_report_key(inputdev,
+
macroKeyEvents[aiptek-lastMacro], 0);
+   aiptek-lastMacro = -1;
+   }
input_sync(inputdev);
}
}
@@ -589,6 +594,11 @@ static void aiptek_irq(struct urb *urb)
}
}
input_report_abs(inputdev, ABS_MISC, p | 
AIPTEK_REPORT_TOOL_STYLUS);
+   if (aiptek-lastMacro != -1) {
+   input_report_key(inputdev,
+
macroKeyEvents[aiptek-lastMacro], 0);
+   aiptek-lastMacro = -1;
+   }
input_sync(inputdev);
}
}
@@ -647,6 +657,11 @@ static void aiptek_irq(struct urb *urb)
}
}
input_report_abs(inputdev, ABS_MISC, p | 
AIPTEK_REPORT_TOOL_MOUSE);
+   if (aiptek-lastMacro != -1) {
+   input_report_key(inputdev,
+
macroKeyEvents[aiptek-lastMacro], 0);
+   aiptek-lastMacro = -1;
+   }
input_sync(inputdev);
}
}
@@ -662,10 +677,10 @@ static void aiptek_irq(struct urb *urb)
bs = (data[1]  aiptek-curSetting.stylusButtonLower) != 0 ? 1 
: 0;
pck = (data[1]  aiptek-curSetting.stylusButtonUpper) != 0 ? 1 
: 0;
 
-   macro = data[3];
+   macro = dv  p  tip  !(data[3]  1) ? (data[3]  1) : -1;
z = le16_to_cpu(get_unaligned((__le16 *) (data + 4)));
 
-   if (dv != 0) {
+   if (dv) {
/* If the selected tool changed, reset the old
 * tool key, and set the new one.
 */
@@ -679,30 +694,20 @@ static void aiptek_irq(struct urb *urb)
aiptek-previousToolMode =
aiptek-curSetting.toolMode;
}
+   }
 
-   if (p != 0) {
-   input_report_key(inputdev, BTN_TOUCH, tip);
-   input_report_key(inputdev, BTN_STYLUS, bs);
-   input_report_key(inputdev, BTN_STYLUS2, pck);
-   input_report_abs(inputdev, ABS_PRESSURE, z);
-   }
+   if (aiptek-lastMacro != -1  aiptek-lastMacro != macro) {
+   input_report_key(inputdev, 
macroKeyEvents[aiptek-lastMacro], 0);
+   aiptek-lastMacro = -1;
+   }
 
-   /* For safety, we're sending key 'break' codes for the
-* neighboring macro keys.
-*/
-   if (macro  0) {
-   input_report_key(inputdev,
-macroKeyEvents[macro - 1], 0);
-   }
-   if (macro  25) {
- 

Input: aiptek - update driver version

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5035522d1a6b55f95e7e01c209b57f5d89f88b16
Commit: 5035522d1a6b55f95e7e01c209b57f5d89f88b16
Parent: 1e7b3faed1793e7637a774240ae22541c5ba6ca0
Author: Rene van Paassen [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:32:21 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:17 2007 -0400

Input: aiptek - update driver version

Update credits and version number to 2.3

Signed-off-by: Rene van Paassen [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/aiptek.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 292eb50..94683f5 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -82,8 +82,8 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION v1.5 (May-15-2004)
-#define DRIVER_AUTHOR  Bryan W. Headley/Chris Atenasio
+#define DRIVER_VERSION v2.3 (May 2, 2007)
+#define DRIVER_AUTHOR  Bryan W. Headley/Chris Atenasio/Cedric Brun/Rene van 
Paassen
 #define DRIVER_DESCAiptek HyperPen USB Tablet Driver (Linux 2.6.x)
 
 /*
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: wriston - reduce polling frequency

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a4da16d3838669d7fb096ea5d1e4917e5ca4dc16
Commit: a4da16d3838669d7fb096ea5d1e4917e5ca4dc16
Parent: 5035522d1a6b55f95e7e01c209b57f5d89f88b16
Author: Eric Piel [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:46:22 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:17 2007 -0400

Input: wriston - reduce polling frequency

Reduces the polling frequency from 10 Hz to 2 Hz, which should be less a 
burden
for laptops wrt energy saving. As it is multimedia keys, 500ms (maximum) of
latency should be still fine for the user. In order to keep fluent the 
feeling
when the user is pressing several keys in a raw (such as changing the 
volume),
the frequency is increased for a short duration after a key is pressed.

Signed-off-by: Eric Piel [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/misc/wistron_btns.c |   18 ++
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/input/misc/wistron_btns.c 
b/drivers/input/misc/wistron_btns.c
index 961aad7..320262a 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -22,6 +22,7 @@
 #include linux/init.h
 #include linux/input.h
 #include linux/interrupt.h
+#include linux/jiffies.h
 #include linux/kernel.h
 #include linux/mc146818rtc.h
 #include linux/module.h
@@ -37,9 +38,10 @@
  */
 #define MAX_POLL_ITERATIONS 64
 
-#define POLL_FREQUENCY 10 /* Number of polls per second */
+#define POLL_FREQUENCY 2 /* Number of polls per second when idle */
+#define POLL_FREQUENCY_BURST 10 /* Polls per second when a key was recently 
pressed */
 
-#if POLL_FREQUENCY  HZ
+#if POLL_FREQUENCY_BURST  HZ
 #error POLL_FREQUENCY too high
 #endif
 
@@ -1079,6 +1081,8 @@ static void handle_key(u8 code)
 
 static void poll_bios(unsigned long discard)
 {
+   static unsigned long jiffies_last_press;
+   unsigned long jiffies_now = jiffies;
u8 qlen;
u16 val;
 
@@ -1087,11 +1091,17 @@ static void poll_bios(unsigned long discard)
if (qlen == 0)
break;
val = bios_pop_queue();
-   if (val != 0  !discard)
+   if (val != 0  !discard) {
handle_key((u8)val);
+   jiffies_last_press = jiffies_now;
+   }
}
 
-   mod_timer(poll_timer, jiffies + HZ / POLL_FREQUENCY);
+   /* Increase precision if user is currently pressing keys ( 2s ago) */
+   if (time_after(jiffies_last_press, jiffies_now - (HZ * 2)))
+   mod_timer(poll_timer, jiffies_now + HZ / POLL_FREQUENCY_BURST);
+   else
+   mod_timer(poll_timer, jiffies_now + HZ / POLL_FREQUENCY);
 }
 
 static int __devinit wistron_probe(struct platform_device *dev)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: wistron - add LED support

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=389679d8faa38bb6d069d9e1805f15e3cb9a6d7f
Commit: 389679d8faa38bb6d069d9e1805f15e3cb9a6d7f
Parent: a4da16d3838669d7fb096ea5d1e4917e5ca4dc16
Author: Eric Piel [EMAIL PROTECTED]
AuthorDate: Mon May 21 00:46:31 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:17 2007 -0400

Input: wistron - add LED support

Add support to wistron_btns for leds that come with the multimedia keys.
Mail and wifi leds are supported, on laptops which have them.

Depending on the laptop, wifi subsystem may control just the led, or both
the led and the wifi card. Wifi led interface is activated only for the
former type of laptops, as the latter type is already managed. Leds are
controled by the interface in /sys/class/leds.

Signed-off-by: Eric Piel [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/misc/Kconfig|5 ++-
 drivers/input/misc/wistron_btns.c |   88 -
 2 files changed, 91 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 88e2907..4326f53 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -65,9 +65,12 @@ config INPUT_COBALT_BTNS
 config INPUT_WISTRON_BTNS
tristate x86 Wistron laptop button interface
depends on X86  !X86_64
+   select NEW_LEDS
+   select LEDS_CLASS
help
  Say Y here for support of Winstron laptop button interface, used on
- laptops of various brands, including Acer and Fujitsu-Siemens.
+ laptops of various brands, including Acer and Fujitsu-Siemens. If
+ available, mail and wifi leds will be controlable via /sys/class/leds.
 
  To compile this driver as a module, choose M here: the module will
  be called wistron_btns.
diff --git a/drivers/input/misc/wistron_btns.c 
b/drivers/input/misc/wistron_btns.c
index 320262a..d58ddca 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -31,6 +31,7 @@
 #include linux/timer.h
 #include linux/types.h
 #include linux/platform_device.h
+#include linux/leds.h
 
 /*
  * Number of attempts to read data from queue per poll;
@@ -48,11 +49,12 @@
 /* BIOS subsystem IDs */
 #define WIFI   0x35
 #define BLUETOOTH  0x34
+#define MAIL_LED   0x31
 
 MODULE_AUTHOR(Miloslav Trmac [EMAIL PROTECTED]);
 MODULE_DESCRIPTION(Wistron laptop button driver);
 MODULE_LICENSE(GPL v2);
-MODULE_VERSION(0.2);
+MODULE_VERSION(0.3);
 
 static int force; /* = 0; */
 module_param(force, bool, 0);
@@ -253,6 +255,7 @@ enum { KE_END, KE_KEY, KE_SW, KE_WIFI, KE_BLUETOOTH };
 static const struct key_entry *keymap; /* = NULL; Current key map */
 static int have_wifi;
 static int have_bluetooth;
+static int have_leds;
 
 static int __init dmi_matched(struct dmi_system_id *dmi)
 {
@@ -265,6 +268,8 @@ static int __init dmi_matched(struct dmi_system_id *dmi)
else if (key-type == KE_BLUETOOTH)
have_bluetooth = 1;
}
+   have_leds = key-code  (FE_MAIL_LED | FE_WIFI_LED);
+
return 1;
 }
 
@@ -1030,6 +1035,83 @@ static void report_switch(unsigned code, int value)
input_sync(input_dev);
 }
 
+
+ /* led management */
+static void wistron_mail_led_set(struct led_classdev *led_cdev,
+   enum led_brightness value)
+{
+   bios_set_state(MAIL_LED, (value != LED_OFF) ? 1 : 0);
+}
+
+/* same as setting up wifi card, but for laptops on which the led is managed */
+static void wistron_wifi_led_set(struct led_classdev *led_cdev,
+   enum led_brightness value)
+{
+   bios_set_state(WIFI, (value != LED_OFF) ? 1 : 0);
+}
+
+static struct led_classdev wistron_mail_led = {
+   .name   = mail:green,
+   .brightness_set = wistron_mail_led_set,
+};
+
+static struct led_classdev wistron_wifi_led = {
+   .name   = wifi:red,
+   .brightness_set = wistron_wifi_led_set,
+};
+
+static void __devinit wistron_led_init(struct device *parent)
+{
+   if (have_leds  FE_WIFI_LED) {
+   u16 wifi = bios_get_default_setting(WIFI);
+   if (wifi  1) {
+   wistron_wifi_led.brightness = (wifi  2) ? LED_FULL : 
LED_OFF;
+   if (led_classdev_register(parent, wistron_wifi_led))
+   have_leds = ~FE_WIFI_LED;
+   else
+   bios_set_state(WIFI, 
wistron_wifi_led.brightness);
+
+   } else
+   have_leds = ~FE_WIFI_LED;
+   }
+
+   if (have_leds  FE_MAIL_LED) {
+   /* bios_get_default_setting(MAIL) always retuns 0, so just turn 
the led off */
+

Input: wistron - convert to use input-polldev

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c2554c91425a86e5d0409a76b7ddcb328362f08b
Commit: c2554c91425a86e5d0409a76b7ddcb328362f08b
Parent: 389679d8faa38bb6d069d9e1805f15e3cb9a6d7f
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Tue May 22 23:48:39 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:17 2007 -0400

Input: wistron - convert to use input-polldev

Switch to using input-polldev skeleton instead of implementing
polling loop by itself.

Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/misc/Kconfig|1 +
 drivers/input/misc/wistron_btns.c |  200 +++--
 2 files changed, 102 insertions(+), 99 deletions(-)

diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 4326f53..9b26574 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -65,6 +65,7 @@ config INPUT_COBALT_BTNS
 config INPUT_WISTRON_BTNS
tristate x86 Wistron laptop button interface
depends on X86  !X86_64
+   select INPUT_POLLDEV
select NEW_LEDS
select LEDS_CLASS
help
diff --git a/drivers/input/misc/wistron_btns.c 
b/drivers/input/misc/wistron_btns.c
index d58ddca..622630f 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -20,7 +20,7 @@
 #include linux/io.h
 #include linux/dmi.h
 #include linux/init.h
-#include linux/input.h
+#include linux/input-polldev.h
 #include linux/interrupt.h
 #include linux/jiffies.h
 #include linux/kernel.h
@@ -28,23 +28,13 @@
 #include linux/module.h
 #include linux/preempt.h
 #include linux/string.h
-#include linux/timer.h
 #include linux/types.h
 #include linux/platform_device.h
 #include linux/leds.h
 
-/*
- * Number of attempts to read data from queue per poll;
- * the queue can hold up to 31 entries
- */
-#define MAX_POLL_ITERATIONS 64
-
-#define POLL_FREQUENCY 2 /* Number of polls per second when idle */
-#define POLL_FREQUENCY_BURST 10 /* Polls per second when a key was recently 
pressed */
-
-#if POLL_FREQUENCY_BURST  HZ
-#error POLL_FREQUENCY too high
-#endif
+/* How often we poll keys - msecs */
+#define POLL_INTERVAL_DEFAULT  500 /* when idle */
+#define POLL_INTERVAL_BURST100 /* when a key was recently pressed */
 
 /* BIOS subsystem IDs */
 #define WIFI   0x35
@@ -973,66 +963,23 @@ static int __init select_keymap(void)
 
  /* Input layer interface */
 
-static struct input_dev *input_dev;
-
-static int __devinit setup_input_dev(void)
-{
-   const struct key_entry *key;
-   int error;
-
-   input_dev = input_allocate_device();
-   if (!input_dev)
-   return -ENOMEM;
-
-   input_dev-name = Wistron laptop buttons;
-   input_dev-phys = wistron/input0;
-   input_dev-id.bustype = BUS_HOST;
-   input_dev-cdev.dev = wistron_device-dev;
-
-   for (key = keymap; key-type != KE_END; key++) {
-   switch (key-type) {
-   case KE_KEY:
-   set_bit(EV_KEY, input_dev-evbit);
-   set_bit(key-keycode, input_dev-keybit);
-   break;
-
-   case KE_SW:
-   set_bit(EV_SW, input_dev-evbit);
-   set_bit(key-sw.code, input_dev-swbit);
-   break;
-
-   default:
-   ;
-   }
-   }
-
-   /* reads information flags on KE_END */
-   if (key-code  FE_UNTESTED)
-   printk(KERN_WARNING Untested laptop multimedia keys, 
-   please report success or failure to eric.piel
-   @tremplin-utc.net\n);
-
-   error = input_register_device(input_dev);
-   if (error) {
-   input_free_device(input_dev);
-   return error;
-   }
-
-   return 0;
-}
+static struct input_polled_dev *wistron_idev;
+static unsigned long jiffies_last_press;
+static int wifi_enabled;
+static int bluetooth_enabled;
 
-static void report_key(unsigned keycode)
+static void report_key(struct input_dev *dev, unsigned int keycode)
 {
-   input_report_key(input_dev, keycode, 1);
-   input_sync(input_dev);
-   input_report_key(input_dev, keycode, 0);
-   input_sync(input_dev);
+   input_report_key(dev, keycode, 1);
+   input_sync(dev);
+   input_report_key(dev, keycode, 0);
+   input_sync(dev);
 }
 
-static void report_switch(unsigned code, int value)
+static void report_switch(struct input_dev *dev, unsigned int code, int value)
 {
-   input_report_switch(input_dev, code, value);
-   input_sync(input_dev);
+   input_report_switch(dev, code, value);
+   input_sync(dev);
 }
 
 
@@ -1112,15 +1059,6 @@ static inline void wistron_led_resume(void)

Input: wistron - add support for querying/changing keymap

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d63219a10126b878abbbffdf4c5bcf29ef756b7f
Commit: d63219a10126b878abbbffdf4c5bcf29ef756b7f
Parent: c2554c91425a86e5d0409a76b7ddcb328362f08b
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Thu Jun 14 23:31:45 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:17 2007 -0400

Input: wistron - add support for querying/changing keymap

Implement getkeycode and setkeycode methods for the device so
EVIOCGKEYCODE and EVIOCSKEYCODE ioctls will work.

Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/misc/wistron_btns.c |  121 ++--
 1 files changed, 87 insertions(+), 34 deletions(-)

diff --git a/drivers/input/misc/wistron_btns.c 
b/drivers/input/misc/wistron_btns.c
index 622630f..60121f1 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -242,7 +242,7 @@ enum { KE_END, KE_KEY, KE_SW, KE_WIFI, KE_BLUETOOTH };
 #define FE_WIFI_LED 0x02
 #define FE_UNTESTED 0x80
 
-static const struct key_entry *keymap; /* = NULL; Current key map */
+static struct key_entry *keymap; /* = NULL; Current key map */
 static int have_wifi;
 static int have_bluetooth;
 static int have_leds;
@@ -1059,47 +1059,64 @@ static inline void wistron_led_resume(void)
led_classdev_resume(wistron_wifi_led);
 }
 
-static void handle_key(u8 code)
+static struct key_entry *wistron_get_entry_by_scancode(int code)
 {
-   const struct key_entry *key;
+   struct key_entry *key;
 
-   for (key = keymap; key-type != KE_END; key++) {
-   if (code == key-code) {
-   switch (key-type) {
-   case KE_KEY:
-   report_key(wistron_idev-input, key-keycode);
-   break;
+   for (key = keymap; key-type != KE_END; key++)
+   if (code == key-code)
+   return key;
 
-   case KE_SW:
-   report_switch(wistron_idev-input,
- key-sw.code, key-sw.value);
-   break;
+   return NULL;
+}
 
-   case KE_WIFI:
-   if (have_wifi) {
-   wifi_enabled = !wifi_enabled;
-   bios_set_state(WIFI, wifi_enabled);
-   }
-   break;
+static struct key_entry *wistron_get_entry_by_keycode(int keycode)
+{
+   struct key_entry *key;
 
-   case KE_BLUETOOTH:
-   if (have_bluetooth) {
-   bluetooth_enabled = !bluetooth_enabled;
-   bios_set_state(BLUETOOTH, 
bluetooth_enabled);
-   }
-   break;
+   for (key = keymap; key-type != KE_END; key++)
+   if (key-type == KE_KEY  keycode == key-keycode)
+   return key;
 
-   case KE_END:
-   break;
+   return NULL;
+}
 
-   default:
-   BUG();
+static void handle_key(u8 code)
+{
+   const struct key_entry *key = wistron_get_entry_by_scancode(code);
+
+   if (key) {
+   switch (key-type) {
+   case KE_KEY:
+   report_key(wistron_idev-input, key-keycode);
+   break;
+
+   case KE_SW:
+   report_switch(wistron_idev-input,
+ key-sw.code, key-sw.value);
+   break;
+
+   case KE_WIFI:
+   if (have_wifi) {
+   wifi_enabled = !wifi_enabled;
+   bios_set_state(WIFI, wifi_enabled);
+   }
+   break;
+
+   case KE_BLUETOOTH:
+   if (have_bluetooth) {
+   bluetooth_enabled = !bluetooth_enabled;
+   bios_set_state(BLUETOOTH, bluetooth_enabled);
}
-   jiffies_last_press = jiffies;
-   return;
+   break;
+
+   default:
+   BUG();
}
-   }
-   printk(KERN_NOTICE wistron_btns: Unknown key code %02X\n, code);
+   jiffies_last_press = jiffies;
+   } else
+   printk(KERN_NOTICE
+   wistron_btns: Unknown key code %02X\n, code);
 }
 
 static void poll_bios(bool discard)
@@ -1134,6 +1151,39 @@ static void wistron_poll(struct input_polled_dev *dev)
dev-poll_interval = POLL_INTERVAL_DEFAULT;
 }
 

Input: convert from class devices to standard devices

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9657d75c5f0f7d0a9cb507521d3ad1436aea28c9
Commit: 9657d75c5f0f7d0a9cb507521d3ad1436aea28c9
Parent: d63219a10126b878abbbffdf4c5bcf29ef756b7f
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Thu Jun 14 23:32:24 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:17 2007 -0400

Input: convert from class devices to standard devices

Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/evdev.c|   84 
 drivers/input/input.c|  136 ++
 drivers/input/joydev.c   |   84 
 drivers/input/mousedev.c |  242 +-
 drivers/input/tsdev.c|   88 +-
 include/linux/input.h|   20 ++--
 6 files changed, 345 insertions(+), 309 deletions(-)

diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index be6b93c..ab4b2d9 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -30,6 +30,7 @@ struct evdev {
wait_queue_head_t wait;
struct evdev_client *grab;
struct list_head client_list;
+   struct device dev;
 };
 
 struct evdev_client {
@@ -94,8 +95,10 @@ static int evdev_flush(struct file *file, fl_owner_t id)
return input_flush_device(evdev-handle, file);
 }
 
-static void evdev_free(struct evdev *evdev)
+static void evdev_free(struct device *dev)
 {
+   struct evdev *evdev = container_of(dev, struct evdev, dev);
+
evdev_table[evdev-minor] = NULL;
kfree(evdev);
 }
@@ -114,12 +117,10 @@ static int evdev_release(struct inode *inode, struct file 
*file)
list_del(client-node);
kfree(client);
 
-   if (!--evdev-open) {
-   if (evdev-exist)
-   input_close_device(evdev-handle);
-   else
-   evdev_free(evdev);
-   }
+   if (!--evdev-open  evdev-exist)
+   input_close_device(evdev-handle);
+
+   put_device(evdev-dev);
 
return 0;
 }
@@ -139,24 +140,32 @@ static int evdev_open(struct inode *inode, struct file 
*file)
if (!evdev || !evdev-exist)
return -ENODEV;
 
+   get_device(evdev-dev);
+
client = kzalloc(sizeof(struct evdev_client), GFP_KERNEL);
-   if (!client)
-   return -ENOMEM;
+   if (!client) {
+   error = -ENOMEM;
+   goto err_put_evdev;
+   }
 
client-evdev = evdev;
list_add_tail(client-node, evdev-client_list);
 
if (!evdev-open++  evdev-exist) {
error = input_open_device(evdev-handle);
-   if (error) {
-   list_del(client-node);
-   kfree(client);
-   return error;
-   }
+   if (error)
+   goto err_free_client;
}
 
file-private_data = client;
return 0;
+
+ err_free_client:
+   list_del(client-node);
+   kfree(client);
+ err_put_evdev:
+   put_device(evdev-dev);
+   return error;
 }
 
 #ifdef CONFIG_COMPAT
@@ -625,8 +634,6 @@ static int evdev_connect(struct input_handler *handler, 
struct input_dev *dev,
 const struct input_device_id *id)
 {
struct evdev *evdev;
-   struct class_device *cdev;
-   dev_t devt;
int minor;
int error;
 
@@ -649,38 +656,32 @@ static int evdev_connect(struct input_handler *handler, 
struct input_dev *dev,
evdev-handle.name = evdev-name;
evdev-handle.handler = handler;
evdev-handle.private = evdev;
-   sprintf(evdev-name, event%d, minor);
-
-   evdev_table[minor] = evdev;
+   snprintf(evdev-name, sizeof(evdev-name), event%d, minor);
 
-   devt = MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
+   snprintf(evdev-dev.bus_id, sizeof(evdev-dev.bus_id),
+event%d, minor);
+   evdev-dev.class = input_class;
+   evdev-dev.parent = dev-dev;
+   evdev-dev.devt = MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor);
+   evdev-dev.release = evdev_free;
+   device_initialize(evdev-dev);
 
-   cdev = class_device_create(input_class, dev-cdev, devt,
-  dev-cdev.dev, evdev-name);
-   if (IS_ERR(cdev)) {
-   error = PTR_ERR(cdev);
-   goto err_free_evdev;
-   }
+   evdev_table[minor] = evdev;
 
-   /* temporary symlink to keep userspace happy */
-   error = sysfs_create_link(input_class.subsys.kobj,
- cdev-kobj, evdev-name);
+   error = device_add(evdev-dev);
if (error)
-   goto err_cdev_destroy;
+   goto err_free_evdev;
 
error = input_register_handle(evdev-handle);
if (error)
-   goto err_remove_link;
+   goto err_delete_evdev;
 
return 0;
 
- 

Input: add gpio-mouse driver

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f5655023f2814969b744c1e07494666587243aa
Commit: 5f5655023f2814969b744c1e07494666587243aa
Parent: 9657d75c5f0f7d0a9cb507521d3ad1436aea28c9
Author: Hans-Christian Egtvedt [EMAIL PROTECTED]
AuthorDate: Thu Jun 14 23:32:35 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:17 2007 -0400

Input: add gpio-mouse driver

Adds support for simulating a mouse using GPIO lines. The driver
needs an appropriate platform device to be created by architecture
code.

The driver has been tested on AT32AP7000 microprocessor using the
ATSTK1000 development board.

Signed-off-by: Hans-Christian Egtvedt [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/mouse/Kconfig  |   16 +++
 drivers/input/mouse/Makefile |1 +
 drivers/input/mouse/gpio_mouse.c |  196 ++
 include/linux/gpio_mouse.h   |   61 
 4 files changed, 274 insertions(+), 0 deletions(-)

diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index 50e06e8..7bbea09 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -216,4 +216,20 @@ config MOUSE_HIL
help
  Say Y here to support HIL pointers.
 
+config MOUSE_GPIO
+   tristate GPIO mouse
+   depends on GENERIC_GPIO
+   select INPUT_POLLDEV
+   help
+ This driver simulates a mouse on GPIO lines of various CPUs (and some
+ other chips).
+
+ Say Y here if your device has buttons or a simple joystick connected
+ directly to GPIO lines. Your board-specific setup logic must also
+ provide a platform device and platform data saying which GPIOs are
+ used.
+
+ To compile this driver as a module, choose M here: the
+ module will be called gpio_mouse.
+
 endif
diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
index aa4ba87..9e6e363 100644
--- a/drivers/input/mouse/Makefile
+++ b/drivers/input/mouse/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_MOUSE_PS2)   += psmouse.o
 obj-$(CONFIG_MOUSE_SERIAL) += sermouse.o
 obj-$(CONFIG_MOUSE_HIL)+= hil_ptr.o
 obj-$(CONFIG_MOUSE_VSXXXAA)+= vsxxxaa.o
+obj-$(CONFIG_MOUSE_GPIO)   += gpio_mouse.o
 
 psmouse-objs := psmouse-base.o synaptics.o
 
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c
new file mode 100644
index 000..0936d6b
--- /dev/null
+++ b/drivers/input/mouse/gpio_mouse.c
@@ -0,0 +1,196 @@
+/*
+ * Driver for simulating a mouse on GPIO lines.
+ *
+ * Copyright (C) 2007 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/init.h
+#include linux/version.h
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/input-polldev.h
+#include linux/gpio_mouse.h
+
+#include asm/gpio.h
+
+/*
+ * Timer function which is run every scan_ms ms when the device is opened.
+ * The dev input varaible is set to the the input_dev pointer.
+ */
+static void gpio_mouse_scan(struct input_polled_dev *dev)
+{
+   struct gpio_mouse_platform_data *gpio = dev-private;
+   struct input_dev *input = dev-input;
+   int x, y;
+
+   if (gpio-bleft = 0)
+   input_report_key(input, BTN_LEFT,
+   gpio_get_value(gpio-bleft) ^ gpio-polarity);
+   if (gpio-bmiddle = 0)
+   input_report_key(input, BTN_MIDDLE,
+   gpio_get_value(gpio-bmiddle) ^ gpio-polarity);
+   if (gpio-bright = 0)
+   input_report_key(input, BTN_RIGHT,
+   gpio_get_value(gpio-bright) ^ gpio-polarity);
+
+   x = (gpio_get_value(gpio-right) ^ gpio-polarity)
+   - (gpio_get_value(gpio-left) ^ gpio-polarity);
+   y = (gpio_get_value(gpio-down) ^ gpio-polarity)
+   - (gpio_get_value(gpio-up) ^ gpio-polarity);
+
+   input_report_rel(input, REL_X, x);
+   input_report_rel(input, REL_Y, y);
+   input_sync(input);
+}
+
+static int __init gpio_mouse_probe(struct platform_device *pdev)
+{
+   struct gpio_mouse_platform_data *pdata = pdev-dev.platform_data;
+   struct input_polled_dev *input_poll;
+   struct input_dev *input;
+   int pin, i;
+   int error;
+
+   if (!pdata) {
+   dev_err(pdev-dev, no platform data\n);
+   error = -ENXIO;
+   goto out;
+   }
+
+   if (pdata-scan_ms  0) {
+   dev_err(pdev-dev, invalid scan time\n);
+   error = -EINVAL;
+   goto out;
+   }
+
+   for (i = 0; i  GPIO_MOUSE_PIN_MAX; i++) {
+   pin = pdata-pins[i];
+
+   if 

Input: wacom - add support for the new Bamboo tablets

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7ecfbfd3d000a5d6787cf3369228e7f0082b8758
Commit: 7ecfbfd3d000a5d6787cf3369228e7f0082b8758
Parent: 5f5655023f2814969b744c1e07494666587243aa
Author: Ping Cheng [EMAIL PROTECTED]
AuthorDate: Thu Jun 14 23:32:48 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:17 2007 -0400

Input: wacom - add support for the new Bamboo tablets

Signed-off-by: Ping Cheng [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tablet/wacom.h |8 --
 drivers/input/tablet/wacom_sys.c |6 +
 drivers/input/tablet/wacom_wac.c |   47 +-
 drivers/input/tablet/wacom_wac.h |1 +
 4 files changed, 53 insertions(+), 9 deletions(-)

diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h
index ef01a80..6542edb 100644
--- a/drivers/input/tablet/wacom.h
+++ b/drivers/input/tablet/wacom.h
@@ -11,7 +11,7 @@
  *  Copyright (c) 2000 Daniel Egger[EMAIL PROTECTED]
  *  Copyright (c) 2001 Frederic Lepied [EMAIL PROTECTED]
  *  Copyright (c) 2004 Panagiotis Issaris  [EMAIL PROTECTED]
- *  Copyright (c) 2002-2006 Ping Cheng [EMAIL PROTECTED]
+ *  Copyright (c) 2002-2007 Ping Cheng [EMAIL PROTECTED]
  *
  *  ChangeLog:
  *  v0.1 (vp)  - Initial release
@@ -62,8 +62,9 @@
  * - Minor data report fix
  *  v1.46 (pc) - Split wacom.c into wacom_sys.c and wacom_wac.c,
  *- where wacom_sys.c deals with system specific code,
- *- and wacom_wac.c deals with Wacom specific code
+ *- and wacom_wac.c deals with Wacom specific code
  *- Support Intuos3 4x6
+ *  v1.47 (pc) - Added support for Bamboo
  */
 
 /*
@@ -84,7 +85,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION v1.46
+#define DRIVER_VERSION v1.47
 #define DRIVER_AUTHOR Vojtech Pavlik [EMAIL PROTECTED]
 #define DRIVER_DESC USB Wacom Graphire and Wacom Intuos tablet driver
 #define DRIVER_LICENSE GPL
@@ -123,6 +124,7 @@ extern void input_dev_i3(struct input_dev *input_dev, 
struct wacom_wac *wacom_wa
 extern void input_dev_i(struct input_dev *input_dev, struct wacom_wac 
*wacom_wac);
 extern void input_dev_pl(struct input_dev *input_dev, struct wacom_wac 
*wacom_wac);
 extern void input_dev_pt(struct input_dev *input_dev, struct wacom_wac 
*wacom_wac);
+extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac 
*wacom_wac);
 extern __u16 wacom_le16_to_cpu(unsigned char *data);
 extern __u16 wacom_be16_to_cpu(unsigned char *data);
 extern struct wacom_features * get_wacom_feature(const struct usb_device_id 
*id);
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 83bddef..064e123 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -138,6 +138,12 @@ static void wacom_close(struct input_dev *dev)
usb_kill_urb(wacom-irq);
 }
 
+void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
+{
+   input_dev-keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
+   input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
+}
+
 void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 {
input_dev-evbit[0] |= BIT(EV_MSC);
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 7661f03..fc03ba2 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -178,7 +178,8 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void 
*wcombo)
 
case 2: /* Mouse with wheel */
wacom_report_key(wcombo, BTN_MIDDLE, data[1]  
0x04);
-   if (wacom-features-type == WACOM_G4) {
+   if (wacom-features-type == WACOM_G4 ||
+   wacom-features-type == 
WACOM_MO) {
rw = data[7]  0x04 ? (data[7]  
0x03)-4 : (data[7]  0x03);
wacom_report_rel(wcombo, REL_WHEEL, 
-rw);
} else
@@ -190,7 +191,8 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void 
*wcombo)
id = CURSOR_DEVICE_ID;
wacom_report_key(wcombo, BTN_LEFT, data[1]  
0x01);
wacom_report_key(wcombo, BTN_RIGHT, data[1]  
0x02);
-   if (wacom-features-type == WACOM_G4)
+   if (wacom-features-type == WACOM_G4 ||
+   wacom-features-type == 
WACOM_MO)
wacom_report_abs(wcombo, ABS_DISTANCE, 
data[6]  0x3f);
else

Input: grip-mp - use ARRAY_SIZE

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5ec1f7f3e4a4896062dc6a64d38036588733bc23
Commit: 5ec1f7f3e4a4896062dc6a64d38036588733bc23
Parent: 7ecfbfd3d000a5d6787cf3369228e7f0082b8758
Author: Andi Drebes [EMAIL PROTECTED]
AuthorDate: Thu Jun 14 23:33:01 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:18 2007 -0400

Input: grip-mp - use ARRAY_SIZE

Signed-off-by: Andi Drebes [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/joystick/grip_mp.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c
index 555319e..4ed3a3e 100644
--- a/drivers/input/joystick/grip_mp.c
+++ b/drivers/input/joystick/grip_mp.c
@@ -320,10 +320,10 @@ static int multiport_io(struct gameport* gameport, int 
sendflags, int sendcode,
 
 static int dig_mode_start(struct gameport *gameport, u32 *packet)
 {
-   int i, seq_len = sizeof(init_seq)/sizeof(int);
+   int i;
int flags, tries = 0, bads = 0;
 
-   for (i = 0; i  seq_len; i++) { /* Send magic sequence */
+   for (i = 0; i  ARRAY_SIZE(init_seq); i++) { /* Send magic sequence 
*/
if (init_seq[i])
gameport_trigger(gameport);
udelay(GRIP_INIT_DELAY);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: xpad - fix check for succesful usb_buffer_alloc

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2e8335a629e48a753642772a5fe758c12d2e48bf
Commit: 2e8335a629e48a753642772a5fe758c12d2e48bf
Parent: 5ec1f7f3e4a4896062dc6a64d38036588733bc23
Author: Jan Kratochvil [EMAIL PROTECTED]
AuthorDate: Thu Jun 14 23:33:13 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:18 2007 -0400

Input: xpad - fix check for succesful usb_buffer_alloc

Signed-off-by: Jan Kratochvil [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/joystick/xpad.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 0c04a26..067ed8d 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -407,7 +407,7 @@ static int xpad_init_ff(struct usb_interface *intf, struct 
usb_xpad *xpad)
 
xpad-odata = usb_buffer_alloc(xpad-udev, XPAD_PKT_LEN,
   GFP_ATOMIC, xpad-odata_dma );
-   if (!xpad-idata)
+   if (!xpad-odata)
goto fail1;
 
xpad-irq_out = usb_alloc_urb(0, GFP_KERNEL);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: xpad - make xpad_play_effect() static

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6426b333a7365035ede9744faa24bdc5682fad8a
Commit: 6426b333a7365035ede9744faa24bdc5682fad8a
Parent: 2e8335a629e48a753642772a5fe758c12d2e48bf
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Thu Jun 14 23:33:26 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:18 2007 -0400

Input: xpad - make xpad_play_effect() static

xpad_play_effect() does not need to be global.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/joystick/xpad.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 067ed8d..de4fa8c 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -376,7 +376,8 @@ exit:
   __FUNCTION__, retval);
 }
 
-int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect 
*effect)
+static int xpad_play_effect(struct input_dev *dev, void *data,
+   struct ff_effect *effect)
 {
struct usb_xpad *xpad = input_get_drvdata(dev);
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: xpad - fix report for dpad and inverted Y and RY axes on xbox 360

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ae91d10aab2762f81733e9194cb56eff99c8d808
Commit: ae91d10aab2762f81733e9194cb56eff99c8d808
Parent: 6426b333a7365035ede9744faa24bdc5682fad8a
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Thu Jun 14 23:49:55 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:18 2007 -0400

Input: xpad - fix report for dpad and inverted Y and RY axes on xbox 360

Make the driver report Y/RY up as positive value and down as negative. Also
make DPAD mapping the same as classic xpad.

Reported-by: Brian Magnuson [EMAIL PROTECTED]
Tested-by: Jan Kratochvil [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/joystick/xpad.c |   40 
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index de4fa8c..244089c 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -236,8 +236,8 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 
cmd, unsigned char *d
} else /* xpad-dpad_mapping == MAP_DPAD_TO_BUTTONS */ {
input_report_key(dev, BTN_LEFT,  data[2]  0x04);
input_report_key(dev, BTN_RIGHT, data[2]  0x08);
-   input_report_key(dev, BTN_0, data[2]  0x01); // up
-   input_report_key(dev, BTN_1, data[2]  0x02); // down
+   input_report_key(dev, BTN_0, data[2]  0x01); /* up */
+   input_report_key(dev, BTN_1, data[2]  0x02); /* down */
}
 
/* start/back buttons and stick press left/right */
@@ -275,40 +275,40 @@ static void xpad360_process_packet(struct usb_xpad *xpad, 
u16 cmd, unsigned char
 
/* digital pad */
if (xpad-dpad_mapping == MAP_DPAD_TO_AXES) {
-   input_report_abs(dev, ABS_HAT0X, !!(data[2]  0x01) - 
!!((data[2]  0x08)  3));
-   input_report_abs(dev, ABS_HAT0Y, !!((data[2]  0x02)  1) - 
!!((data[2]  0x04)  2));
-   } else if ( xpad-dpad_mapping == MAP_DPAD_TO_BUTTONS ) {
+   input_report_abs(dev, ABS_HAT0X, !!(data[2]  0x08) - 
!!(data[2]  0x04));
+   input_report_abs(dev, ABS_HAT0Y, !!(data[2]  0x02) - 
!!(data[2]  0x01));
+   } else if (xpad-dpad_mapping == MAP_DPAD_TO_BUTTONS) {
/* dpad as buttons (right, left, down, up) */
-   input_report_key(dev, BTN_RIGHT, (data[2]  0x01));
-   input_report_key(dev, BTN_LEFT, (data[2]  0x08)  3);
-   input_report_key(dev, BTN_0, (data[2]  0x02)  1);
-   input_report_key(dev, BTN_1, (data[2]  0x04)  2);
+   input_report_key(dev, BTN_LEFT, data[2]  0x04);
+   input_report_key(dev, BTN_RIGHT, data[2]  0x08);
+   input_report_key(dev, BTN_0, data[2]  0x01);   /* up */
+   input_report_key(dev, BTN_1, data[2]  0x02);   /* down */
}
 
/* start/back buttons */
-   input_report_key(dev, BTN_START,  (data[2]  0x10)  4);
-   input_report_key(dev, BTN_BACK,   (data[2]  0x20)  5);
+   input_report_key(dev, BTN_START,  data[2]  0x10);
+   input_report_key(dev, BTN_BACK,   data[2]  0x20);
 
/* stick press left/right */
input_report_key(dev, BTN_THUMBL, data[2]  0x40);
input_report_key(dev, BTN_THUMBR, data[2]  0x80);
 
/* buttons A,B,X,Y,TL,TR and MODE */
-   input_report_key(dev, BTN_A, (data[3]  0x10)  4);
-   input_report_key(dev, BTN_B, (data[3]  0x20)  5);
-   input_report_key(dev, BTN_X, (data[3]  0x40)  6);
-   input_report_key(dev, BTN_Y, (data[3]  0x80)  7);
-   input_report_key(dev, BTN_TL, data[3]  0x01 );
-   input_report_key(dev, BTN_TR, (data[3]  0x02)  1);
-   input_report_key(dev, BTN_MODE, (data[3]  0x04)  2);
+   input_report_key(dev, BTN_A,data[3]  0x10);
+   input_report_key(dev, BTN_B,data[3]  0x20);
+   input_report_key(dev, BTN_X,data[3]  0x40);
+   input_report_key(dev, BTN_Y,data[3]  0x80);
+   input_report_key(dev, BTN_TL,   data[3]  0x01);
+   input_report_key(dev, BTN_TR,   data[3]  0x02);
+   input_report_key(dev, BTN_MODE, data[3]  0x04);
 
/* left stick */
input_report_abs(dev, ABS_X, (__s16) (((__s16)data[7]  8) | 
(__s16)data[6]));
-   input_report_abs(dev, ABS_Y, ~(__s16) (((__s16)data[9]  8) | 
(__s16)data[8]));
+   input_report_abs(dev, ABS_Y, (__s16) (((__s16)data[9]  8) | 
(__s16)data[8]));
 
/* right stick */
-   input_report_abs(dev, ABS_RY, ~(__s16) (((__s16)data[13]  8) | 
(__s16)data[12]));
input_report_abs(dev, ABS_RX, (__s16) (((__s16)data[11]  8) | 
(__s16)data[10]));
+   input_report_abs(dev, ABS_RY, (__s16) (((__s16)data[13]  8) | 
(__s16)data[12]));
 
/* triggers left/right */
input_report_abs(dev, 

Input: ppc-beep - switch to using input_dev-dev.parent

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1e2831db01c0726ec046e69719a10d7696b283fb
Commit: 1e2831db01c0726ec046e69719a10d7696b283fb
Parent: ae91d10aab2762f81733e9194cb56eff99c8d808
Author: Dmitry Torokhov [EMAIL PROTECTED]
AuthorDate: Thu Jun 14 23:58:51 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:18 2007 -0400

Input: ppc-beep - switch to using input_dev-dev.parent

In preparation for struct class_device - struct device input
core conversion, switch to using input_dev-dev.parent when
specifying device position in sysfs tree.

Also, do not access input_dev-private directly, use helpers.

Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 sound/ppc/beep.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/ppc/beep.c b/sound/ppc/beep.c
index 5f38f67..a1aa89f 100644
--- a/sound/ppc/beep.c
+++ b/sound/ppc/beep.c
@@ -118,7 +118,7 @@ static int snd_pmac_beep_event(struct input_dev *dev, 
unsigned int type,
default: return -1;
}
 
-   chip = dev-private;
+   chip = input_get_drvdata(dev);
if (! chip || (beep = chip-beep) == NULL)
return -1;
 
@@ -239,8 +239,8 @@ int __init snd_pmac_attach_beep(struct snd_pmac *chip)
input_dev-evbit[0] = BIT(EV_SND);
input_dev-sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
input_dev-event = snd_pmac_beep_event;
-   input_dev-private = chip;
-   input_dev-cdev.dev = chip-pdev-dev;
+   input_dev-dev.parent = chip-pdev-dev;
+   input_set_drvdata(input_dev, chip);
 
beep-dev = input_dev;
beep-buf = dmabuf;
@@ -251,8 +251,8 @@ int __init snd_pmac_attach_beep(struct snd_pmac *chip)
err = snd_ctl_add(chip-card, beep_ctl);
if (err  0)
goto fail1;
- 
-   chip-beep = beep;
+
+   chip-beep = beep;
 
err = input_register_device(beep-dev);
if (err)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: usbtouchscreen - add support for IRTOUCHSYSTEMS touchscreens

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df561fcd445c9cf9f4fff98ea795a0e72b7dc1e1
Commit: df561fcd445c9cf9f4fff98ea795a0e72b7dc1e1
Parent: 1e2831db01c0726ec046e69719a10d7696b283fb
Author: Ondrej Zary [EMAIL PROTECTED]
AuthorDate: Tue Jul 3 01:55:03 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:35:18 2007 -0400

Input: usbtouchscreen - add support for IRTOUCHSYSTEMS touchscreens

This patch adds support for IRTOUCHSYSTEMS (or UNITOP) infrared 
touchscreens.

The touchscreen sends data in 8-byte packets.
BYTE 0 - unknown meaning, seen only one value: 0x54
BYTE 1 - unknown meaning, 3 lowest bits indicate touch state
values seen: 0x81, 0x82 or 0x83
bit 0 = set if the screen is touched and was not touched before 
(touch
bit 1 = set if the screen is touched and was touched (dragging)
bit 2 = set if the touch was ended (release)
BYTES 2 and 3 - X position, high-order-byte first, range = 0 to 0x0FFF
BYTES 4 and 5 - Y position, high-order-byte first, range = 0 to 0x0FFF
BYTE 6 - unknown meaning, seen only one value: 0xFF
BYTE 7 - unknown meaning, seen only one value: 0x00

Signed-off-by: Ondrej Zary [EMAIL PROTECTED]
Signed-off-by: Daniel Ritz [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/touchscreen/Kconfig  |6 +
 drivers/input/touchscreen/usbtouchscreen.c |   33 
 2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/drivers/input/touchscreen/Kconfig 
b/drivers/input/touchscreen/Kconfig
index e5cca9b..6937177 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -177,6 +177,7 @@ config TOUCHSCREEN_USB_COMPOSITE
  - some other eTurboTouch
  - Gunze AHL61
  - DMC TSC-10/25
+ - IRTOUCHSYSTEMS/UNITOP
 
  Have a look at http://linux.chapter7.ch/touchkit/ for
  a usage description and the required user-space stuff.
@@ -219,4 +220,9 @@ config TOUCHSCREEN_USB_DMC_TSC10
bool DMC TSC-10/25 device support if EMBEDDED
depends on TOUCHSCREEN_USB_COMPOSITE
 
+config TOUCHSCREEN_USB_IRTOUCH
+   default y
+   bool IRTOUCHSYSTEMS/UNITOP device support if EMBEDDED
+   depends on TOUCHSCREEN_USB_COMPOSITE
+
 endif
diff --git a/drivers/input/touchscreen/usbtouchscreen.c 
b/drivers/input/touchscreen/usbtouchscreen.c
index e3f2285..b407028 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -9,6 +9,7 @@
  *  - eTurboTouch
  *  - Gunze AHL61
  *  - DMC TSC-10/25
+ *  - IRTOUCHSYSTEMS/UNITOP
  *
  * Copyright (C) 2004-2006 by Daniel Ritz [EMAIL PROTECTED]
  * Copyright (C) by Todd E. Johnson (mtouchusb.c)
@@ -110,6 +111,7 @@ enum {
DEVTYPE_ETURBO,
DEVTYPE_GUNZE,
DEVTYPE_DMC_TSC10,
+   DEVTYPE_IRTOUCH,
 };
 
 static struct usb_device_id usbtouch_devices[] = {
@@ -150,6 +152,11 @@ static struct usb_device_id usbtouch_devices[] = {
{USB_DEVICE(0x0afa, 0x03e8), .driver_info = DEVTYPE_DMC_TSC10},
 #endif
 
+#ifdef CONFIG_TOUCHSCREEN_USB_IRTOUCH
+   {USB_DEVICE(0x595a, 0x0001), .driver_info = DEVTYPE_IRTOUCH},
+   {USB_DEVICE(0x6615, 0x0001), .driver_info = DEVTYPE_IRTOUCH},
+#endif
+
{}
 };
 
@@ -416,6 +423,21 @@ static int dmc_tsc10_read_data(struct usbtouch_usb *dev, 
unsigned char *pkt)
 
 
 /*
+ * IRTOUCH Part
+ */
+#ifdef CONFIG_TOUCHSCREEN_USB_IRTOUCH
+static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
+{
+   dev-x = (pkt[3]  8) | pkt[2];
+   dev-y = (pkt[5]  8) | pkt[4];
+   dev-touch = (pkt[1]  0x03) ? 1 : 0;
+
+   return 1;
+}
+#endif
+
+
+/*
  * the different device descriptors
  */
 static struct usbtouch_device_info usbtouch_dev_info[] = {
@@ -504,6 +526,17 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
.read_data  = dmc_tsc10_read_data,
},
 #endif
+
+#ifdef CONFIG_TOUCHSCREEN_USB_IRTOUCH
+   [DEVTYPE_IRTOUCH] = {
+   .min_xc = 0x0,
+   .max_xc = 0x0fff,
+   .min_yc = 0x0,
+   .max_yc = 0x0fff,
+   .rept_size  = 8,
+   .read_data  = irtouch_read_data,
+   },
+#endif
 };
 
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: serio_raw - shut up errorneous warning

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4f179f71607382888c5ce5385a4ee136e1a2002a
Commit: 4f179f71607382888c5ce5385a4ee136e1a2002a
Parent: 2f1d076a220bf57270020a1e756a9f34108b9338
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 00:38:31 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:38:31 2007 -0400

Input: serio_raw - shut up errorneous warning

drivers/input/serio/serio_raw.c: In function 'serio_raw_read':
drivers/input/serio/serio_raw.c:163: warning: 'c' may be used uninitialized 
in this function

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/serio/serio_raw.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c
index 8873576..0403622 100644
--- a/drivers/input/serio/serio_raw.c
+++ b/drivers/input/serio/serio_raw.c
@@ -160,7 +160,7 @@ static ssize_t serio_raw_read(struct file *file, char 
__user *buffer, size_t cou
 {
struct serio_raw_list *list = file-private_data;
struct serio_raw *serio_raw = list-serio_raw;
-   char c;
+   char uninitialized_var(c);
ssize_t retval = 0;
 
if (!serio_raw-serio)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: pxa27x_keyboard - fix compile error

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=744c9c33eaa062f716c6ae0bcb022b47c3af8b73
Commit: 744c9c33eaa062f716c6ae0bcb022b47c3af8b73
Parent: 4f179f71607382888c5ce5385a4ee136e1a2002a
Author: Mike Rapoport [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 00:38:39 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:38:39 2007 -0400

Input: pxa27x_keyboard - fix compile error

Signed-off-by: Mike Rapoport [EMAIL PROTECTED]
Acked-by: Rodolfo Giometti [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/keyboard/pxa27x_keyboard.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/keyboard/pxa27x_keyboard.c 
b/drivers/input/keyboard/pxa27x_keyboard.c
index f9e82c9..ebe5eac 100644
--- a/drivers/input/keyboard/pxa27x_keyboard.c
+++ b/drivers/input/keyboard/pxa27x_keyboard.c
@@ -140,7 +140,7 @@ static int pxakbd_resume(struct platform_device *pdev)
KPREC = pdata-reg_kprec;
 
/* Enable unit clock */
-   pxa_set_cken(CKEN19_KEYPAD, 1);
+   pxa_set_cken(CKEN_KEYPAD, 1);
}
 
mutex_unlock(input_dev-mutex);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Input: tsdev - fix broken usec-to-millisecs conversion

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=65f88f89c94d877794a6006f210d75d2974a182e
Commit: 65f88f89c94d877794a6006f210d75d2974a182e
Parent: 744c9c33eaa062f716c6ae0bcb022b47c3af8b73
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 00:43:06 2007 -0400
Committer:  Dmitry Torokhov [EMAIL PROTECTED]
CommitDate: Tue Jul 10 00:43:06 2007 -0400

Input: tsdev - fix broken usec-to-millisecs conversion

Noted by Fengwei Yin [EMAIL PROTECTED]

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---
 drivers/input/tsdev.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c
index 4cd5bbc..d2f882e 100644
--- a/drivers/input/tsdev.c
+++ b/drivers/input/tsdev.c
@@ -371,7 +371,7 @@ static void tsdev_event(struct input_handle *handle, 
unsigned int type,
int x, y, tmp;
 
do_gettimeofday(time);
-   client-event[client-head].millisecs = time.tv_usec / 100;
+   client-event[client-head].millisecs = time.tv_usec / 1000;
client-event[client-head].pressure = tsdev-pressure;
 
x = tsdev-x;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[TRIVIAL PATCH] Kill blk_congestion_wait() stub for !CONFIG_BLOCK

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7deeed13170e634adc4552ff94588d6301a3da83
Commit: 7deeed13170e634adc4552ff94588d6301a3da83
Parent: 71780f59e127bb281a9302d430495ca9586c14e7
Author: Benjamin Gilbert [EMAIL PROTECTED]
AuthorDate: Tue Jun 19 09:05:21 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 08:03:32 2007 +0200

[TRIVIAL PATCH] Kill blk_congestion_wait() stub for !CONFIG_BLOCK

blk_congestion_wait() doesn't exist anymore, but there's still a stub
in blkdev.h for the !CONFIG_BLOCK case.  Kill it.

Signed-off-by: Benjamin Gilbert [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 include/linux/blkdev.h |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index db5b00a..fae138b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -868,11 +868,6 @@ void kblockd_flush_work(struct work_struct *work);
  */
 #define buffer_heads_over_limit 0
 
-static inline long blk_congestion_wait(int rw, long timeout)
-{
-   return io_schedule_timeout(timeout);
-}
-
 static inline long nr_blockdev_pages(void)
 {
return 0;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


blk_hw_contig_segment(): bad segment size checks

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=32eef964110985c5845472e07fa0a18838a970c4
Commit: 32eef964110985c5845472e07fa0a18838a970c4
Parent: 7deeed13170e634adc4552ff94588d6301a3da83
Author: Jens Axboe [EMAIL PROTECTED]
AuthorDate: Tue Jun 19 09:09:27 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 08:03:32 2007 +0200

blk_hw_contig_segment(): bad segment size checks

Two bugs in there:

- The virt oversize check should use the current bio hardware back
  size and the next bio front size, not the same bio. Spotted by
  Neil Brown.

- The segment size check should add hw front sizes, not total bio
  sizes. Spotted by James Bottomley

Acked-by: James Bottomley [EMAIL PROTECTED]
Acked-by: NeilBrown [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 block/ll_rw_blk.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index c99b463..3e7801e 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1304,9 +1304,9 @@ static int blk_hw_contig_segment(request_queue_t *q, 
struct bio *bio,
if (unlikely(!bio_flagged(nxt, BIO_SEG_VALID)))
blk_recount_segments(q, nxt);
if (!BIOVEC_VIRT_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)) ||
-   BIOVEC_VIRT_OVERSIZE(bio-bi_hw_front_size + bio-bi_hw_back_size))
+   BIOVEC_VIRT_OVERSIZE(bio-bi_hw_back_size + nxt-bi_hw_front_size))
return 0;
-   if (bio-bi_size + nxt-bi_size  q-max_segment_size)
+   if (bio-bi_hw_back_size + nxt-bi_hw_front_size  q-max_segment_size)
return 0;
 
return 1;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] cdrom_sysctl_info fix

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=554988d6fe369719ae5b41255c577569ecf47c30
Commit: 554988d6fe369719ae5b41255c577569ecf47c30
Parent: 32eef964110985c5845472e07fa0a18838a970c4
Author: Dave Young [EMAIL PROTECTED]
AuthorDate: Tue Jun 19 09:14:26 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 08:03:33 2007 +0200

[PATCH] cdrom_sysctl_info fix

Fix the cdrom_sysctl_info possible buffer overwrite bug. Also
fix the locking of accessing topCdromPtr pointer.

Signed-off-by: Dave Young [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 drivers/cdrom/cdrom.c |  216 -
 1 files changed, 125 insertions(+), 91 deletions(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 3625a05..aa5468f 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -302,7 +302,7 @@ module_param(lockdoor, bool, 0);
 module_param(check_media_type, bool, 0);
 module_param(mrw_format_restart, bool, 0);
 
-static DEFINE_SPINLOCK(cdrom_lock);
+static DEFINE_MUTEX(cdrom_mutex);
 
 static const char *mrw_format_status[] = {
not mrw,
@@ -438,10 +438,10 @@ int register_cdrom(struct cdrom_device_info *cdi)
cdo-generic_packet = cdrom_dummy_generic_packet;
 
cdinfo(CD_REG_UNREG, drive \/dev/%s\ registered\n, cdi-name);
-   spin_lock(cdrom_lock);
+   mutex_lock(cdrom_mutex);
cdi-next = topCdromPtr;
topCdromPtr = cdi;
-   spin_unlock(cdrom_lock);
+   mutex_unlock(cdrom_mutex);
return 0;
 }
 #undef ENSURE
@@ -452,7 +452,7 @@ int unregister_cdrom(struct cdrom_device_info *unreg)
cdinfo(CD_OPEN, entering unregister_cdrom\n); 
 
prev = NULL;
-   spin_lock(cdrom_lock);
+   mutex_lock(cdrom_mutex);
cdi = topCdromPtr;
while (cdi  cdi != unreg) {
prev = cdi;
@@ -460,7 +460,7 @@ int unregister_cdrom(struct cdrom_device_info *unreg)
}
 
if (cdi == NULL) {
-   spin_unlock(cdrom_lock);
+   mutex_unlock(cdrom_mutex);
return -2;
}
if (prev)
@@ -468,7 +468,7 @@ int unregister_cdrom(struct cdrom_device_info *unreg)
else
topCdromPtr = cdi-next;
 
-   spin_unlock(cdrom_lock);
+   mutex_unlock(cdrom_mutex);
 
if (cdi-exit)
cdi-exit(cdi);
@@ -3289,103 +3289,137 @@ static struct cdrom_sysctl_settings {
int check;  /* check media type */
 } cdrom_sysctl_settings;
 
+enum cdrom_print_option {
+   CTL_NAME,
+   CTL_SPEED,
+   CTL_SLOTS,
+   CTL_CAPABILITY
+};
+
+static int cdrom_print_info(const char *header, int val, char *info,
+   int *pos, enum cdrom_print_option option)
+{
+   const int max_size = sizeof(cdrom_sysctl_settings.info);
+   struct cdrom_device_info *cdi;
+   int ret;
+
+   ret = scnprintf(info + *pos, max_size - *pos, header);
+   if (!ret)
+   return 1;
+
+   *pos += ret;
+
+   for (cdi = topCdromPtr; cdi; cdi = cdi-next) {
+   switch (option) {
+   case CTL_NAME:
+   ret = scnprintf(info + *pos, max_size - *pos,
+   \t%s, cdi-name);
+   break;
+   case CTL_SPEED:
+   ret = scnprintf(info + *pos, max_size - *pos,
+   \t%d, cdi-speed);
+   break;
+   case CTL_SLOTS:
+   ret = scnprintf(info + *pos, max_size - *pos,
+   \t%d, cdi-capacity);
+   break;
+   case CTL_CAPABILITY:
+   ret = scnprintf(info + *pos, max_size - *pos,
+   \t%d, CDROM_CAN(val) != 0);
+   break;
+   default:
+   printk(KERN_INFO cdrom: invalid option%d\n, option);
+   return 1;
+   }
+   if (!ret)
+   return 1;
+   *pos += ret;
+   }
+
+   return 0;
+}
+
 static int cdrom_sysctl_info(ctl_table *ctl, int write, struct file * filp,
void __user *buffer, size_t *lenp, loff_t *ppos)
 {
-int pos;
-   struct cdrom_device_info *cdi;
+   int pos;
char *info = cdrom_sysctl_settings.info;
+   const int max_size = sizeof(cdrom_sysctl_settings.info);

if (!*lenp || (*ppos  !write)) {
*lenp = 0;
return 0;
}
 
+   mutex_lock(cdrom_mutex);
+
pos = sprintf(info, CD-ROM information,  VERSION \n);

-   pos += sprintf(info+pos, \ndrive name:\t);
-   for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi-next)
-   pos += 

[BLOCK] drop unnecessary bvec rewinding from flush_dry_bio_endio

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f4b09303d00212ead0619db58d8ec8a0a7a94882
Commit: f4b09303d00212ead0619db58d8ec8a0a7a94882
Parent: 554988d6fe369719ae5b41255c577569ecf47c30
Author: Tejun Heo [EMAIL PROTECTED]
AuthorDate: Tue Jun 19 09:18:13 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 08:03:33 2007 +0200

[BLOCK] drop unnecessary bvec rewinding from flush_dry_bio_endio

Barrier bios are completed twice - once after the barrier write itself
is done and again after the whole sequence is complete.
flush_dry_bio_endio() is for the first completion.  It doesn't really
complete the bio.  It rewinds bvec and resets bio so that it can be
completed again when the whole barrier sequence is complete.

The bvec rewinding code has the following problems.

1. The rewinding code is wrong because filesystems may pass bvec with
   non zero bv_offset.

2. The block layer doesn't guarantee anything about the state of
   bvec array on request completion.  bv_offset and len are updated
   iff __end_that_request_first() completes the bvec partially.

Because of #2, #1 doesn't really matter (nobody cares whether bvec is
re-wound correctly or not) but then again by not doing unwinding at
all, we'll always give back the same bvec to the caller as full bvec
completion doesn't alter bvecs and the final completion is always full
completion.

Drop unnecessary rewinding code.

This is spotted by Neil Brown.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 block/ll_rw_blk.c |9 -
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 3e7801e..ef42bb2 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -527,8 +527,6 @@ int blk_do_ordered(request_queue_t *q, struct request **rqp)
 static int flush_dry_bio_endio(struct bio *bio, unsigned int bytes, int error)
 {
request_queue_t *q = bio-bi_private;
-   struct bio_vec *bvec;
-   int i;
 
/*
 * This is dry run, restore bio_sector and size.  We'll finish
@@ -540,13 +538,6 @@ static int flush_dry_bio_endio(struct bio *bio, unsigned 
int bytes, int error)
if (bio-bi_size)
return 1;
 
-   /* Rewind bvec's */
-   bio-bi_idx = 0;
-   bio_for_each_segment(bvec, bio, i) {
-   bvec-bv_len += bvec-bv_offset;
-   bvec-bv_offset = 0;
-   }
-
/* Reset bio */
set_bit(BIO_UPTODATE, bio-bi_flags);
bio-bi_size = q-bi_size;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Remove acsi.c

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c2bcf3b8978c291e1b7f6499475c8403a259d4d6
Commit: c2bcf3b8978c291e1b7f6499475c8403a259d4d6
Parent: f4b09303d00212ead0619db58d8ec8a0a7a94882
Author: Jens Axboe [EMAIL PROTECTED]
AuthorDate: Tue Jun 19 19:13:36 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 08:03:33 2007 +0200

[PATCH] Remove acsi.c

Originally from Boaz Harrosh [EMAIL PROTECTED]

It hasn't been working in 2.5 or 2.6 ever, since it's still buffer_head
based.

Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 drivers/block/Kconfig  |   33 +-
 drivers/block/Makefile |1 -
 drivers/block/acsi.c   | 1825 
 3 files changed, 1 insertions(+), 1858 deletions(-)

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index b4c8319..d6ad7b3 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -56,40 +56,9 @@ config AMIGA_Z2RAM
  To compile this driver as a module, choose M here: the
  module will be called z2ram.
 
-config ATARI_ACSI
-   tristate Atari ACSI support
-   depends on ATARI  BROKEN
-   ---help---
- This enables support for the Atari ACSI interface. The driver
- supports hard disks and CD-ROMs, which have 512-byte sectors, or can
- be switched to that mode. Due to the ACSI command format, only disks
- up to 1 GB are supported. Special support for certain ACSI to SCSI
- adapters, which could relax that, isn't included yet. The ACSI
- driver is also the basis for certain other drivers for devices
- attached to the ACSI bus: Atari SLM laser printer, BioNet-100
- Ethernet, and PAMsNet Ethernet. If you want to use one of these
- devices, you need ACSI support, too.
-
- To compile this driver as a module, choose M here: the
- module will be called acsi.
-
-comment Some devices (e.g. CD jukebox) support multiple LUNs
-   depends on ATARI  ATARI_ACSI
-
-config ACSI_MULTI_LUN
-   bool Probe all LUNs on each ACSI device
-   depends on ATARI_ACSI
-   help
- If you have a ACSI device that supports more than one LUN (Logical
- Unit Number), e.g. a CD jukebox, you should say Y here so that all
- will be found by the ACSI driver. An ACSI device with multiple LUNs
- acts logically like multiple ACSI devices. The vast majority of ACSI
- devices have only one LUN, and so most people can say N here and
- should in fact do so, because it is safer.
-
 config ATARI_SLM
tristate Atari SLM laser printer support
-   depends on ATARI  ATARI_ACSI!=n
+   depends on ATARI
help
  If you have an Atari SLM laser printer, say Y to include support for
  it in the kernel. Otherwise, say N. This driver is also available as
diff --git a/drivers/block/Makefile b/drivers/block/Makefile
index dd88e33..e5f98ac 100644
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
@@ -9,7 +9,6 @@ obj-$(CONFIG_MAC_FLOPPY)+= swim3.o
 obj-$(CONFIG_BLK_DEV_FD)   += floppy.o
 obj-$(CONFIG_AMIGA_FLOPPY) += amiflop.o
 obj-$(CONFIG_ATARI_FLOPPY) += ataflop.o
-obj-$(CONFIG_ATARI_ACSI)   += acsi.o
 obj-$(CONFIG_ATARI_SLM)+= acsi_slm.o
 obj-$(CONFIG_AMIGA_Z2RAM)  += z2ram.o
 obj-$(CONFIG_BLK_DEV_RAM)  += rd.o
diff --git a/drivers/block/acsi.c b/drivers/block/acsi.c
deleted file mode 100644
index e3d9152..000
--- a/drivers/block/acsi.c
+++ /dev/null
@@ -1,1825 +0,0 @@
-/*
- * acsi.c -- Device driver for Atari ACSI hard disks
- *
- * Copyright 1994 Roman Hodek [EMAIL PROTECTED]
- *
- * Some parts are based on hd.c by Linus Torvalds
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file COPYING in the main directory of this archive for
- * more details.
- *
- */
-
-/*
- * Still to in this file:
- *  - If a command ends with an error status (!= 0), the following
- *REQUEST SENSE commands (4 to fill the ST-DMA FIFO) are done by
- *polling the _IRQ signal (not interrupt-driven). This should be
- *avoided in future because it takes up a non-neglectible time in
- *the interrupt service routine while interrupts are disabled.
- *Maybe a timer interrupt will get lost :-(
- */
-
-/*
- * General notes:
- *
- *  - All ACSI devices (disks, CD-ROMs, ...) use major number 28.
- *Minors are organized like it is with SCSI: The upper 4 bits
- *identify the device, the lower 4 bits the partition.
- *The device numbers (the upper 4 bits) are given in the same
- *order as the devices are found on the bus.
- *  - Up to 8 LUNs are supported for each target (if CONFIG_ACSI_MULTI_LUN
- *is defined), but only a total of 16 devices (due to minor
- *numbers...). Note that Atari allows only a maximum of 4 targets
- *(i.e. 

cciss: add new controller support for P700m

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9cff3b383dad193b0762c27278a16237e10b53dc
Commit: 9cff3b383dad193b0762c27278a16237e10b53dc
Parent: c2bcf3b8978c291e1b7f6499475c8403a259d4d6
Author: Mike Miller (OS Dev [EMAIL PROTECTED]
AuthorDate: Tue Jun 19 20:52:18 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 08:03:33 2007 +0200

cciss: add new controller support for P700m

This patch adds support for the Smart Array P700m SAS controller. This new
controller will ship Fall 2007.

Signed-off-by: Mike Miller [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 drivers/block/cciss.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 5acc6c4..0fcad43 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -87,6 +87,7 @@ static const struct pci_device_id cciss_pci_device_id[] = {
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3214},
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215},
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3237},
+   {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x323D},
{PCI_VENDOR_ID_HP, PCI_ANY_ID,  PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_RAID  8, 0x  8, 0},
{0,}
@@ -119,6 +120,7 @@ static struct board_type products[] = {
{0x3214103C, Smart Array E200i, SA5_access, 120},
{0x3215103C, Smart Array E200i, SA5_access, 120},
{0x3237103C, Smart Array E500, SA5_access, 512},
+   {0x323D103C, Smart Array P700m, SA5_access, 512},
{0x103C, Unknown Smart Array, SA5_access, 120},
 };
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] fix request-cmd == INT cases

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e654bc4393e85e326993256d80b9710a4d6411ff
Commit: e654bc4393e85e326993256d80b9710a4d6411ff
Parent: 9cff3b383dad193b0762c27278a16237e10b53dc
Author: Boaz Harrosh [EMAIL PROTECTED]
AuthorDate: Wed Jun 20 13:53:23 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 08:03:34 2007 +0200

[PATCH] fix request-cmd == INT cases

 - I have unearthed very old bugs in stale drivers that still
   used request-cmd as a READ|WRITE int
 - This patch is maybe a proof that these drivers have not been
   used for a long time. Should they be removed completely?

Drivers that currently do not work for sure:
 drivers/acorn/block/fd1772.c |2 +-
 drivers/acorn/block/mfmhd.c  |8 
 drivers/cdrom/aztcd.c|2 +-
 drivers/cdrom/cm206.c|2 +-
 drivers/cdrom/gscd.c |2 +-
 drivers/cdrom/mcdx.c |2 +-
 drivers/cdrom/optcd.c|2 +-
 drivers/cdrom/sjcd.c |2 +-

Drivers with cosmetic fixes only:
  b/drivers/block/amiflop.c
  b/drivers/block/nbd.c
  b/drivers/ide/legacy/hd.c

Signed-off-by: Boaz Harrosh [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 drivers/acorn/block/fd1772.c |2 +-
 drivers/acorn/block/mfmhd.c  |   13 +++--
 drivers/block/amiflop.c  |2 +-
 drivers/block/nbd.c  |2 +-
 drivers/cdrom/aztcd.c|2 +-
 drivers/cdrom/cm206.c|2 +-
 drivers/cdrom/gscd.c |2 +-
 drivers/cdrom/mcdx.c |2 +-
 drivers/cdrom/optcd.c|2 +-
 drivers/cdrom/sjcd.c |2 +-
 drivers/ide/legacy/hd.c  |3 ++-
 11 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/drivers/acorn/block/fd1772.c b/drivers/acorn/block/fd1772.c
index 674bf81..423ed08 100644
--- a/drivers/acorn/block/fd1772.c
+++ b/drivers/acorn/block/fd1772.c
@@ -1246,7 +1246,7 @@ repeat:
del_timer(motor_off_timer);
 
ReqCnt = 0;
-   ReqCmd = CURRENT-cmd;
+   ReqCmd = rq_data_dir(CURRENT);
ReqBlock = CURRENT-sector;
ReqBuffer = CURRENT-buffer;
setup_req_params(drive);
diff --git a/drivers/acorn/block/mfmhd.c b/drivers/acorn/block/mfmhd.c
index 689a4c3..d85520f 100644
--- a/drivers/acorn/block/mfmhd.c
+++ b/drivers/acorn/block/mfmhd.c
@@ -439,7 +439,7 @@ static void mfm_rw_intr(void)
   a choice of command end or some data which is ready to be collected 
*/
/* I think we have to transfer data while the interrupt line is on and 
its
   not any other type of interrupt */
-   if (CURRENT-cmd == WRITE) {
+   if (rq_data_dir(CURRENT) == WRITE) {
extern void hdc63463_writedma(void);
if ((hdc63463_dataleft = 0)  (!(mfm_status  STAT_CED))) {
printk(mfm_rw_intr: Apparent DMA write request when no 
more to DMA\n);
@@ -799,7 +799,7 @@ static void issue_request(unsigned int block, unsigned int 
nsect,
raw_cmd.head = start_head;
raw_cmd.cylinder = track / p-heads;
raw_cmd.cmdtype = CURRENT-cmd;
-   raw_cmd.cmdcode = CURRENT-cmd == WRITE ? CMD_WD : CMD_RD;
+   raw_cmd.cmdcode = rq_data_dir(CURRENT) == WRITE ? CMD_WD : CMD_RD;
raw_cmd.cmddata[0] = dev + 1;   /* DAG: +1 to get US */
raw_cmd.cmddata[1] = raw_cmd.head;
raw_cmd.cmddata[2] = raw_cmd.cylinder  8;
@@ -830,7 +830,7 @@ static void issue_request(unsigned int block, unsigned int 
nsect,
hdc63463_dataleft = nsect * 256;/* Better way? */
 
DBG(mfm%c: %sing: CHS=%d/%d/%d, sectors=%d, buffer=0x%08lx (%p)\n,
-raw_cmd.dev + 'a', (CURRENT-cmd == READ) ? read : writ,
+raw_cmd.dev + 'a', rq_data_dir(CURRENT) == READ ? read : writ,
   raw_cmd.cylinder,
   raw_cmd.head,
raw_cmd.sector, nsect, (unsigned long) Copy_buffer, CURRENT);
@@ -917,13 +917,6 @@ static void mfm_request(void)
 
DBG(mfm_request: block after offset=%d\n, block);
 
-   if (CURRENT-cmd != READ  CURRENT-cmd != WRITE) {
-   printk(unknown mfm-command %d\n, CURRENT-cmd);
-   end_request(CURRENT, 0);
-   Busy = 0;
-   printk(mfm: continue 4\n);
-   continue;
-   }
issue_request(block, nsect, CURRENT);
 
break;
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 27a1390..6ce8b89 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1363,7 +1363,7 @@ static void redo_fd_request(void)
 #ifdef DEBUG
printk(fd: sector %ld + %d requested for %s\n,
   CURRENT-sector,cnt,
-  (CURRENT-cmd==READ)?read:write);
+  

[GFS2] Remove bogus '\0' in rgrp.c

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c4201214cbf10636e2c1ab9131573f735b42c8d4
Commit: c4201214cbf10636e2c1ab9131573f735b42c8d4
Parent: 8fb68595d508fd30ec90939572484b263600376c
Binary file (standard input) matches
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GFS2] Fix sign problem in quota/statfs and cleanup _host structures

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb8d8a6f54c1c84d7c74623491bab043b36a38c5
Commit: bb8d8a6f54c1c84d7c74623491bab043b36a38c5
Parent: ddf4b426aababdae4cb96326d7aeb9d119f42c50
Binary file (standard input) matches
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sky2: 1.16 version

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0640b8dc74e938543dd8fc8c460c5f913a1b1a74
Commit: 0640b8dc74e938543dd8fc8c460c5f913a1b1a74
Parent: e923d7b124d2b2218faac22714dc6e4639fab2e7
Author: Stephen Hemminger [EMAIL PROTECTED]
AuthorDate: Mon Jul 9 15:33:44 2007 -0700
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:22:30 2007 -0400

sky2: 1.16 version

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/sky2.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 88f3ac2..a2f3215 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -51,7 +51,7 @@
 #include sky2.h
 
 #define DRV_NAME   sky2
-#define DRV_VERSION1.15
+#define DRV_VERSION1.16
 #define PFXDRV_NAME  
 
 /*
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] IP32: Remove experimental tag from kconfig.

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cfd2afc0f654e86e3f0b5060409b90f21964b9d3
Commit: cfd2afc0f654e86e3f0b5060409b90f21964b9d3
Parent: 19df0d1169b3ddcc84933794d1401aaafe2f
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 17:33:00 2007 +0100
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:33:00 2007 +0100

[MIPS] IP32: Remove experimental tag from kconfig.

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/Kconfig |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 8750e61..a29ebfd 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -433,8 +433,7 @@ config SGI_IP27
  here.
 
 config SGI_IP32
-   bool SGI IP32 (O2) (EXPERIMENTAL)
-   depends on EXPERIMENTAL
+   bool SGI IP32 (O2)
select ARC
select ARC32
select BOOT_ELF32
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] Non-FPAFF: Fix warning.

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=35c700c0955c43e168c45d375f90a0670be8f054
Commit: 35c700c0955c43e168c45d375f90a0670be8f054
Parent: bf74b964775009071cf12f9d59d4dd5e388fbe0b
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 08:59:17 2007 +0100
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:33:05 2007 +0100

[MIPS] Non-FPAFF: Fix warning.

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/system.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h
index be64fc5..46bdb3f 100644
--- a/include/asm-mips/system.h
+++ b/include/asm-mips/system.h
@@ -56,7 +56,7 @@ do {  
\
 } while(0)
 
 #else
-#define __mips_mt_fpaff_switch_to(prev) do { (prev); } while (0)
+#define __mips_mt_fpaff_switch_to(prev) do { (void) (prev); } while (0)
 #endif
 
 #define switch_to(prev,next,last)  \
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[netdrvr] Fix dependencies for ax88796 ne2k clone driver

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=def47c5095d53814512bb0c62ec02dfdec769db1
Commit: def47c5095d53814512bb0c62ec02dfdec769db1
Parent: 4c3ca4da8086c3c9fcc81dccc387c34bee6b755e
Author: Jeff Garzik [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 14:06:48 2007 -0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 14:06:48 2007 -0400

[netdrvr] Fix dependencies for ax88796 ne2k clone driver

It needs writesb(), not available on all platforms.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/Kconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index a3bef22..a64c2fb 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -199,6 +199,7 @@ source drivers/net/arm/Kconfig
 
 config AX88796
tristate ASIX AX88796 NE2000 clone support
+   depends on ARM || MIPS
select CRC32
select MII
help
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sky2: unmark as EXPERIMENTAL

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8a3e3bfdf47b82bfbd78aabf7f72df4dff12abcc
Commit: 8a3e3bfdf47b82bfbd78aabf7f72df4dff12abcc
Parent: 55c9dd35d3299dbd6e437c1a0bd86fffcb17080b
Author: Stephen Hemminger [EMAIL PROTECTED]
AuthorDate: Mon Jul 9 15:33:38 2007 -0700
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:22:29 2007 -0400

sky2: unmark as EXPERIMENTAL

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 58c6aa2..4f23ad7 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2118,7 +2118,7 @@ config SKGE
  will be called skge.  This is recommended.
 
 config SKY2
-   tristate SysKonnect Yukon2 support (EXPERIMENTAL)
+   tristate SysKonnect Yukon2 support
depends on PCI
select CRC32
---help---
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


unexport bio_{,un}map_user

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=72d3a38ee083a96c09032e608a4c7e047ce26760
Commit: 72d3a38ee083a96c09032e608a4c7e047ce26760
Parent: f3f541f9ded9dd37edca103dd3be49bfbd9e730d
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Mon Jul 9 09:40:44 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 08:03:34 2007 +0200

unexport bio_{,un}map_user

bio_{,un}map_user no longer have any modular users.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 fs/bio.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/bio.c b/fs/bio.c
index 093345f..33e4634 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1223,8 +1223,6 @@ EXPORT_SYMBOL(bio_hw_segments);
 EXPORT_SYMBOL(bio_add_page);
 EXPORT_SYMBOL(bio_add_pc_page);
 EXPORT_SYMBOL(bio_get_nr_vecs);
-EXPORT_SYMBOL(bio_map_user);
-EXPORT_SYMBOL(bio_unmap_user);
 EXPORT_SYMBOL(bio_map_kern);
 EXPORT_SYMBOL(bio_pair_release);
 EXPORT_SYMBOL(bio_split);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


splice: add void cookie to the actor data

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=130610d6f681c5d970340897f5db000d04a7ef78
Commit: 130610d6f681c5d970340897f5db000d04a7ef78
Parent: 0452a4e5d021900b07ebdeecb9ed03b49f164f3f
Author: Jens Axboe [EMAIL PROTECTED]
AuthorDate: Tue Jun 12 21:20:00 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 08:04:14 2007 +0200

splice: add void cookie to the actor data

We need that for passing driver private info.

Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 include/linux/pipe_fs_i.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index 6e7bfc1..f277a9c 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -94,6 +94,7 @@ struct splice_desc {
union {
void __user *userptr;   /* memory to write to */
struct file *file;  /* file to read/write */
+   void *data; /* cookie */
} u;
loff_t pos; /* file position */
 };
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[libata] pata_atiixp: add SB700 PCI ID

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ca972c2028edd6cd6a6ca40bd1f58b91fb4ea58
Commit: 1ca972c2028edd6cd6a6ca40bd1f58b91fb4ea58
Parent: 64578a3de723d502621860f9d4d28f34d001b066
Author: Jeff Garzik [EMAIL PROTECTED]
AuthorDate: Thu May 24 23:05:25 2007 -0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Jul 9 12:17:32 2007 -0400

[libata] pata_atiixp: add SB700 PCI ID

From AMD.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/pata_atiixp.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 8449146..eceea6c 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -285,6 +285,7 @@ static const struct pci_device_id atiixp[] = {
{ PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP300_IDE), },
{ PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), },
{ PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), },
+   { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), },
 
{ },
 };
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ATA] Add named constant for ATAPI command DEVICE RESET

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab2181cf390902f0371f30e4ebeb407b4aaa7314
Commit: ab2181cf390902f0371f30e4ebeb407b4aaa7314
Parent: a09060ffe516a0e55f29c89b7da2da760c9487d7
Author: Jeff Garzik [EMAIL PROTECTED]
AuthorDate: Mon May 28 08:30:36 2007 -0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Jul 9 12:17:33 2007 -0400

[ATA] Add named constant for ATAPI command DEVICE RESET

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 include/linux/ata.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/ata.h b/include/linux/ata.h
index 703febb..407dc7e 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -126,6 +126,7 @@ enum {
ATA_REG_IRQ = ATA_REG_NSECT,
 
/* ATA device commands */
+   ATA_CMD_DEV_RESET   = 0x08, /* ATAPI device reset */
ATA_CMD_CHK_POWER   = 0xE5, /* check power mode */
ATA_CMD_STANDBY = 0xE2, /* place in standby power mode */
ATA_CMD_IDLE= 0xE3, /* place in idle power mode */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[S390] Fixed comment typo.

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bccdbdc9bd7db3a32c14d8a47f1fb66e3de3c92f
Commit: bccdbdc9bd7db3a32c14d8a47f1fb66e3de3c92f
Parent: d197e6921843932b5d8ecf47d23fcac62e73b19a
Author: Ralph Wuerthner [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 11:24:08 2007 +0200
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Tue Jul 10 11:24:42 2007 +0200

[S390] Fixed comment typo.

Signed-off-by: Ralph Wuerthner [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 arch/s390/crypto/crypt_s390.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/s390/crypto/crypt_s390.h b/arch/s390/crypto/crypt_s390.h
index 2775d26..95f5160 100644
--- a/arch/s390/crypto/crypt_s390.h
+++ b/arch/s390/crypto/crypt_s390.h
@@ -24,7 +24,7 @@
 #define CRYPT_S390_PRIORITY 300
 #define CRYPT_S390_COMPOSITE_PRIORITY 400
 
-/* s930 cryptographic operations */
+/* s390 cryptographic operations */
 enum crypt_s390_operations {
CRYPT_S390_KM   = 0x0100,
CRYPT_S390_KMC  = 0x0200,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GFS2] git-gfs2-nmw-build-fix

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f4fadb23ca49abd2f1387a0b7e78b385ebc760ce
Commit: f4fadb23ca49abd2f1387a0b7e78b385ebc760ce
Parent: b3657629249eba0b3b61ff964d6e1539b469d117
Author: [EMAIL PROTECTED] [EMAIL PROTECTED]
AuthorDate: Wed Jun 27 14:43:37 2007 -0700
Committer:  Steven Whitehouse [EMAIL PROTECTED]
CommitDate: Mon Jul 9 08:24:06 2007 +0100

[GFS2] git-gfs2-nmw-build-fix

Cc: Steven Whitehouse [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Steven Whitehouse [EMAIL PROTECTED]
---
 fs/dlm/lowcomms.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 73d44f5..0553a61 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -728,7 +728,7 @@ static int tcp_accept_from_sock(struct connection *con)
else {
printk(Extra connection from node %d attempted\n, 
nodeid);
result = -EAGAIN;
-   up_write(newcon-sock_sem);
+   mutex_unlock(newcon-sock_mutex);
goto accept_err;
}
}
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


block/Kconfig already has its own menuconfig so remove these

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f5c926e3cba972636b50ab872b421e992d4f401
Commit: 5f5c926e3cba972636b50ab872b421e992d4f401
Parent: 16ed002f224738366c1809023ec70a71ae51421c
Author: Jan Engelhardt [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 12:24:17 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 13:43:28 2007 +0200

block/Kconfig already has its own menuconfig so remove these

menu, endmenu that did not get cleaned up in the block patch
[ http://lkml.org/lkml/2007/4/10/251 ]

Signed-off-by: Jan Engelhardt [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 init/Kconfig |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index a9e99f8..d9d878a 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -686,6 +686,4 @@ config STOP_MACHINE
  Need stop_machine() primitive.
 endmenu
 
-menu Block layer
 source block/Kconfig
-endmenu
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[libata] pata_ixp4xx: kill unused var

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5446b656ddebc2f3902242fda4e860fb343d2787
Commit: 5446b656ddebc2f3902242fda4e860fb343d2787
Parent: a5bf5f5a370ba7c10f5362265e360952145a7da1
Author: Jeff Garzik [EMAIL PROTECTED]
AuthorDate: Mon May 28 09:03:51 2007 -0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Jul 9 12:17:34 2007 -0400

[libata] pata_ixp4xx: kill unused var

Reported by Michael-Luke Jones.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/pata_ixp4xx_cf.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index 7633210..4ca7fd6 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -171,7 +171,6 @@ static __devinit int ixp4xx_pata_probe(struct 
platform_device *pdev)
struct ata_host *host;
struct ata_port *ap;
struct ixp4xx_pata_data *data = pdev-dev.platform_data;
-   int rc;
 
cs0 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
cs1 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


macmace: use unsigned long flags;

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=099575b6cb7eaf18211ba72de56264f67651b90b
Commit: 099575b6cb7eaf18211ba72de56264f67651b90b
Parent: 9514bfe5d92000a9fd6f3c44aa775819b5d78aaf
Author: Alexey Dobriyan [EMAIL PROTECTED]
AuthorDate: Fri Jul 6 18:57:13 2007 +0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:41:18 2007 -0400

macmace: use unsigned long flags;

Code will do local_irq_save() on it.

Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/macmace.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c
index fef3193..9a343b9 100644
--- a/drivers/net/macmace.c
+++ b/drivers/net/macmace.c
@@ -577,7 +577,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id)
struct mace_data *mp = netdev_priv(dev);
volatile struct mace *mb = mp-mace;
int intr, fs;
-   unsigned int flags;
+   unsigned long flags;
 
/* don't want the dma interrupt handler to fire */
local_irq_save(flags);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[S390] cio: Remove prototype for non-existing function cmf_reset().

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=736f563373804e75f9f3b4abb9e480451bfef8d3
Commit: 736f563373804e75f9f3b4abb9e480451bfef8d3
Parent: af512ed0f8a7e6a3c6fd93b2b5882c8e837a6939
Author: Cornelia Huck [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 11:24:20 2007 +0200
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Tue Jul 10 11:24:52 2007 +0200

[S390] cio: Remove prototype for non-existing function cmf_reset().

Signed-off-by: Cornelia Huck [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 include/asm-s390/cmb.h |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/include/asm-s390/cmb.h b/include/asm-s390/cmb.h
index 241756f..021e7c3 100644
--- a/include/asm-s390/cmb.h
+++ b/include/asm-s390/cmb.h
@@ -88,7 +88,6 @@ extern u64 cmf_read(struct ccw_device *cdev, int index);
  *any
  **/
 extern int cmf_readall(struct ccw_device *cdev, struct cmbdata*data);
-extern void cmf_reset(struct ccw_device *cdev);
 
 #endif /* __KERNEL__ */
 #endif /* S390_CMB_H */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[S390] zcore: Fix __user annotation.

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d9f774d439cda5b46324221a47e6aaf7dc2f77cc
Commit: d9f774d439cda5b46324221a47e6aaf7dc2f77cc
Parent: bf1a95a225c1349846274caebdca1bb8d20d5853
Author: Heiko Carstens [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 11:24:12 2007 +0200
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Tue Jul 10 11:24:45 2007 +0200

[S390] zcore: Fix __user annotation.

Signed-off-by: Heiko Carstens [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 drivers/s390/char/zcore.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/s390/char/zcore.c b/drivers/s390/char/zcore.c
index 4e711a9..3712ede 100644
--- a/drivers/s390/char/zcore.c
+++ b/drivers/s390/char/zcore.c
@@ -156,7 +156,7 @@ static int memcpy_real(void *dest, unsigned long src, 
size_t count)
return rc;
 }
 
-static int memcpy_real_user(__user void *dest, unsigned long src, size_t count)
+static int memcpy_real_user(void __user *dest, unsigned long src, size_t count)
 {
static char buf[4096];
int offs = 0, size;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] extern inline - static inline

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9797cae3bfd2d7190609cdce05248cabc5d9081e
Commit: 9797cae3bfd2d7190609cdce05248cabc5d9081e
Parent: e48ce6b8df5b51af3f38b20bb3d008dff69ff64e
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Sat Jul 7 03:03:30 2007 +0200
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:32:55 2007 +0100

[MIPS] extern inline - static inline

extern inline will have different semantics with gcc 4.3, and
static inline is correct here.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/processor.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h
index 5f80ba7..3a466dc 100644
--- a/include/asm-mips/processor.h
+++ b/include/asm-mips/processor.h
@@ -237,7 +237,7 @@ unsigned long get_wchan(struct task_struct *p);
 
 #define ARCH_HAS_PREFETCH
 
-extern inline void prefetch(const void *addr)
+static inline void prefetch(const void *addr)
 {
__asm__ __volatile__(
   .setmips4   \n
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GFS2] Fix typo in rename of directories

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ffed8ab342e39b8b5f4d5c94c37a708e225ffcd8
Commit: ffed8ab342e39b8b5f4d5c94c37a708e225ffcd8
Parent: 44f487a5536a3afd96a9f571de24c36559e9ae82
Author: Steven Whitehouse [EMAIL PROTECTED]
AuthorDate: Thu Jun 7 11:29:35 2007 +0100
Committer:  Steven Whitehouse [EMAIL PROTECTED]
CommitDate: Mon Jul 9 08:23:19 2007 +0100

[GFS2] Fix typo in rename of directories

A typo caused us to pass a NULL pointer when renaming directories. It
was accidentally introduced in: [GFS2] Clean up inode number handling

Signed-off-by: Steven Whitehouse [EMAIL PROTECTED]
---
 fs/gfs2/ops_inode.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
index 9cc07f4..84051b9 100644
--- a/fs/gfs2/ops_inode.c
+++ b/fs/gfs2/ops_inode.c
@@ -749,7 +749,7 @@ static int gfs2_rename(struct inode *odir, struct dentry 
*odentry,
if (error)
goto out_end_trans;
 
-   error = gfs2_dir_mvino(ip, name, nip, DT_DIR);
+   error = gfs2_dir_mvino(ip, name, ndip, DT_DIR);
if (error)
goto out_end_trans;
} else {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sky2: use roundup() macro

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f957da2aa0b7ef9659a45b0895ec4a08602b1c15
Commit: f957da2aa0b7ef9659a45b0895ec4a08602b1c15
Parent: 71749531f2d1954137a1a77422ef4ff29eb102dd
Author: Stephen Hemminger [EMAIL PROTECTED]
AuthorDate: Mon Jul 9 15:33:41 2007 -0700
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:22:29 2007 -0400

sky2: use roundup() macro

Use roundup() macro to size receive buffer.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/sky2.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 4e0b839..8cc3eea 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1180,8 +1180,7 @@ static int sky2_rx_start(struct sky2_port *sky2)
rx_set_checksum(sky2);
 
/* Space needed for frame data + headers rounded up */
-   size = ALIGN(sky2-netdev-mtu + ETH_HLEN + VLAN_HLEN, 8)
-   + 8;
+   size = roundup(sky2-netdev-mtu + ETH_HLEN + VLAN_HLEN, 8);
 
/* Stopping point for hardware truncation */
thresh = (size - 8) / sizeof(u32);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Fix typo in drivers/net/s2io.c

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8453d43f0ee08ac6c20f390797772a08f81f999a
Commit: 8453d43f0ee08ac6c20f390797772a08f81f999a
Parent: 654e02200578799264941e5a9b533563a87f8579
Author: Rolf Eike Beer [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 11:58:02 2007 +0200
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:24:42 2007 -0400

Fix typo in drivers/net/s2io.c

Introduced in d796fdb708fc5b10112934cba43e832c36ce4923.

Signed-off-by: Rolf Eike Beer [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/s2io.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 2d826ff..fa29a40 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -8036,7 +8036,7 @@ static void lro_append_pkt(struct s2io_nic *sp, struct 
lro *lro,
 /**
  * s2io_io_error_detected - called when PCI error is detected
  * @pdev: Pointer to PCI device
- * @state: The current pci conneection state
+ * @state: The current pci connection state
  *
  * This function is called after a PCI bus error affecting
  * this device has been detected.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


use_clustering (sht) bit set to 0 in AHCI ?

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=be5d82183f1ebb022f923b008acf3b760d3a571d
Commit: be5d82183f1ebb022f923b008acf3b760d3a571d
Parent: a16abc0b5ff3ef655e40cb5e6671d57f5dde513d
Author: Jens Axboe [EMAIL PROTECTED]
AuthorDate: Tue May 22 09:45:39 2007 +0200
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Jul 9 12:17:32 2007 -0400

use_clustering (sht) bit set to 0 in AHCI ?

ahci: enable sg segment clustering

The specification states that ahci supports segments up to 4MiB in size,
so enable clustering.

Signed-off-by: Jens Axboe [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/ahci.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index ca5229d..f55c9e7 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -54,7 +54,7 @@ enum {
AHCI_MAX_PORTS  = 32,
AHCI_MAX_SG = 168, /* hardware max is 64K */
AHCI_DMA_BOUNDARY   = 0x,
-   AHCI_USE_CLUSTERING = 0,
+   AHCI_USE_CLUSTERING = 1,
AHCI_MAX_CMDS   = 32,
AHCI_CMD_SZ = 32,
AHCI_CMD_SLOT_SZ= AHCI_MAX_CMDS * AHCI_CMD_SZ,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Use menuconfigs instead of menus, so the whole menu can be disabled at once

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=16ed002f224738366c1809023ec70a71ae51421c
Commit: 16ed002f224738366c1809023ec70a71ae51421c
Parent: 15c31be4d5bd2402c6f5a288d56a24edc9252b71
Author: Jan Engelhardt [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 12:24:11 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 13:43:27 2007 +0200

Use menuconfigs instead of menus, so the whole menu can be disabled at once

instead of going through all options.

Signed-off-by: Jan Engelhardt [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 block/Kconfig |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/Kconfig b/block/Kconfig
index a50f481..2859351 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -1,7 +1,7 @@
 #
 # Block layer core configuration
 #
-config BLOCK
+menuconfig BLOCK
bool Enable the block layer if EMBEDDED
default y
help
@@ -49,6 +49,6 @@ config LSF
 
  If unsure, say Y.
 
-endif
+endif # BLOCK
 
 source block/Kconfig.iosched
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] Remove unused cpu_callout_map and num_booting_cpus()

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4679258d52f6d4aeeafd5c77203d97ddf48e2db0
Commit: 4679258d52f6d4aeeafd5c77203d97ddf48e2db0
Parent: 9797cae3bfd2d7190609cdce05248cabc5d9081e
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Sat Jul 7 03:03:27 2007 +0200
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:32:55 2007 +0100

[MIPS] Remove unused cpu_callout_map and num_booting_cpus()

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/smp.h |7 ---
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/include/asm-mips/smp.h b/include/asm-mips/smp.h
index 1608fd7..13aef6a 100644
--- a/include/asm-mips/smp.h
+++ b/include/asm-mips/smp.h
@@ -49,13 +49,6 @@ extern struct call_data_struct *call_data;
 extern cpumask_t phys_cpu_present_map;
 #define cpu_possible_map   phys_cpu_present_map
 
-extern cpumask_t cpu_callout_map;
-/* We don't mark CPUs online until __cpu_up(), so we need another measure */
-static inline int num_booting_cpus(void)
-{
-   return cpus_weight(cpu_callout_map);
-}
-
 /*
  * These are defined by the board-specific code.
  */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[DLM] fix reference counting

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=292e539e9386823df8aab556f3da09667f78da8c
Commit: 292e539e9386823df8aab556f3da09667f78da8c
Parent: 4bd91ba18198eee42c39d4c334c825d1a0a4b445
Author: Josef Bacik [EMAIL PROTECTED]
AuthorDate: Tue Jun 5 17:36:38 2007 -0400
Committer:  Steven Whitehouse [EMAIL PROTECTED]
CommitDate: Mon Jul 9 08:23:15 2007 +0100

[DLM] fix reference counting

This is a fix for the patch

021d2ff3a08019260a1dc002793c92d6bf18afb6

I left off a dlm_hold_rsb which causes the box to panic if you try to use
debugfs.  This patch fixes the problem.  Sorry about that,

Signed-off-by: Josef Bacik [EMAIL PROTECTED]
Signed-off-by: Steven Whitehouse [EMAIL PROTECTED]
---
 fs/dlm/debug_fs.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c
index 184be98..9f5de37 100644
--- a/fs/dlm/debug_fs.c
+++ b/fs/dlm/debug_fs.c
@@ -250,6 +250,7 @@ static int rsb_iter_next(struct rsb_iter *ri)
goto top;
 }
ri-rsb = list_entry(ri-next, struct dlm_rsb, res_hashchain);
+   dlm_hold_rsb(ri-rsb);
read_unlock(ls-ls_rsbtbl[i].lock);
dlm_put_rsb(old);
}
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Add a PCI ID for santa rosa's PATA controller.

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c1e6f28cc5de37dcd113b9668a185c0b9334ba8a
Commit: c1e6f28cc5de37dcd113b9668a185c0b9334ba8a
Parent: 825cd6dd793770ebd42d9ca19f5ee7d082350317
Author: Christian Lamparter [EMAIL PROTECTED]
AuthorDate: Tue Jul 3 10:19:20 2007 -0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Jul 9 12:17:34 2007 -0400

Add a PCI ID for santa rosa's PATA controller.

Signed-off-by: Christian Lamparter [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/ata_piix.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 924e447..76cbdf0 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -200,6 +200,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
/* ICH7/7-R (i945, i975) UDMA 100*/
{ 0x8086, 0x27DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_133 },
{ 0x8086, 0x269E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
+   /* ICH8 Mobile PATA Controller */
+   { 0x8086, 0x2850, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
 
/* NOTE: The following PCI ids must be kept in sync with the
 * list in drivers/pci/quirks.c.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GFS2] Fix gfs2_block_truncate_page err return

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1875f2f31b3955dff8c3712a56ae61836c8b90fe
Commit: 1875f2f31b3955dff8c3712a56ae61836c8b90fe
Parent: 773ed1a044adc868036dee1722b8bca6ce5923e2
Author: S. Wendy Cheng [EMAIL PROTECTED]
AuthorDate: Mon Jun 25 21:14:31 2007 -0400
Committer:  Steven Whitehouse [EMAIL PROTECTED]
CommitDate: Mon Jul 9 08:23:54 2007 +0100

[GFS2] Fix gfs2_block_truncate_page err return

Code segment inside gfs2_block_truncate_page() doesn't set the return
code correctly. This causes NFSD erroneously returns EIO back to client
with setattr procedure call (truncate error).

Signed-off-by: S. Wendy Cheng [EMAIL PROTECTED]
Signed-off-by: Steven Whitehouse [EMAIL PROTECTED]
---
 fs/gfs2/bmap.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index d16044c..cd805a6 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -927,6 +927,7 @@ static int gfs2_block_truncate_page(struct address_space 
*mapping)
/* Uhhuh. Read error. Complain and punt. */
if (!buffer_uptodate(bh))
goto unlock;
+   err = 0;
}
 
if (sdp-sd_args.ar_data == GFS2_DATA_ORDERED || gfs2_is_jdata(ip))
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


QE Ethernet driver writes to wrong register to mask interrupts

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c6f5047b633f0605098fe47417c4e1ed87a7637a
Commit: c6f5047b633f0605098fe47417c4e1ed87a7637a
Parent: 4f092432bd443416b649519c3d5405aa55ad2d15
Author: Timur Tabi [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 07:51:11 2007 -0500
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:24:42 2007 -0400

QE Ethernet driver writes to wrong register to mask interrupts

The QE Ethernet driver was writing to the wrong register to mask interrupts.
In ucc_geth_stop(), it was clearing UCCE instead of UCCM.

Signed-off-by: Timur Tabi [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/ucc_geth.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 18b731b..e4736a3 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -2276,7 +2276,7 @@ static void ucc_geth_stop(struct ucc_geth_private *ugeth)
phy_stop(phydev);
 
/* Mask all interrupts */
-   out_be32(ugeth-uccf-p_ucce, 0x);
+   out_be32(ugeth-uccf-p_uccm, 0x);
 
/* Clear all interrupts */
out_be32(ugeth-uccf-p_ucce, 0x);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[DLM] show default protocol

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0b7cac0fb0e541a7f54d0ba55b31d829ce3dd899
Commit: 0b7cac0fb0e541a7f54d0ba55b31d829ce3dd899
Parent: 9dd592d70be0db6fa8e4e19d7642cfaa424b200e
Author: David Teigland [EMAIL PROTECTED]
AuthorDate: Tue May 29 08:47:51 2007 -0500
Committer:  Steven Whitehouse [EMAIL PROTECTED]
CommitDate: Mon Jul 9 08:22:59 2007 +0100

[DLM] show default protocol

Display the initial value of the protocol config value in configfs.
The default value has always been 0 in the past anyway, so it's always
appeared to be correct.

Signed-off-by: David Teigland [EMAIL PROTECTED]
Signed-off-by: Steven Whitehouse [EMAIL PROTECTED]
---
 fs/dlm/config.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index 1b59fa5..5069b2c 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -433,6 +433,7 @@ static struct config_group *make_cluster(struct 
config_group *g,
cl-cl_toss_secs = dlm_config.ci_toss_secs;
cl-cl_scan_secs = dlm_config.ci_scan_secs;
cl-cl_log_debug = dlm_config.ci_log_debug;
+   cl-cl_protocol = dlm_config.ci_protocol;
cl-cl_timewarn_cs = dlm_config.ci_timewarn_cs;
 
space_list = sps-ss_group;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GFS2] Addendum to the journaled file/unmount patch

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=773ed1a044adc868036dee1722b8bca6ce5923e2
Commit: 773ed1a044adc868036dee1722b8bca6ce5923e2
Parent: eaf5bd3cac92126e5825c6ebc10bee0fba35d555
Author: Robert Peterson [EMAIL PROTECTED]
AuthorDate: Wed Jun 20 08:34:06 2007 -0500
Committer:  Steven Whitehouse [EMAIL PROTECTED]
CommitDate: Mon Jul 9 08:23:52 2007 +0100

[GFS2] Addendum to the journaled file/unmount patch

This patch is an addendum to the previous journaled file/unmount patch.
It fixes a problem discovered during testing.

Signed-off-by: Bob Peterson [EMAIL PROTECTED]
Signed-off-by: Steven Whitehouse [EMAIL PROTECTED]
---
 fs/gfs2/lops.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index dd810ad..aff70f0 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -472,8 +472,10 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct 
gfs2_log_element *le)
return;
}
tr-tr_touched = 1;
-   tr-tr_num_buf++;
-   list_add(bd-bd_list_tr, tr-tr_list_buf);
+   if (gfs2_is_jdata(ip)) {
+   tr-tr_num_buf++;
+   list_add(bd-bd_list_tr, tr-tr_list_buf);
+   }
gfs2_log_unlock(sdp);
if (!list_empty(le-le_list))
return;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] Remove unused config entries

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d7eb079fc8e68899fd099ad0b5b8095193a8c025
Commit: d7eb079fc8e68899fd099ad0b5b8095193a8c025
Parent: e934c82657529a85ca48a2fc3749c514df985e79
Author: Yoichi Yuasa [EMAIL PROTECTED]
AuthorDate: Mon May 28 22:56:35 2007 +0900
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:32:55 2007 +0100

[MIPS] Remove unused config entries

Signed-off-by: Yoichi Yuasa [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/Kconfig |   11 ---
 1 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 7345538..c20cd90 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -841,15 +841,10 @@ config MIPS_TX3927
 config MIPS_RM9122
bool
select SERIAL_RM9000
-   select GPI_RM9000
-   select WDT_RM9000
 
 config PCI_MARVELL
bool
 
-config SERIAL_RM9000
-   bool
-
 config PNX8550
bool
select SOC_PNX8550
@@ -875,12 +870,6 @@ config EMMA2RH
 config SERIAL_RM9000
bool
 
-config GPI_RM9000
-   bool
-
-config WDT_RM9000
-   bool
-
 #
 # Unfortunately not all GT64120 systems run the chip at the same clock.
 # As the user for the clock rate and try to minimize the available options.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GFS2] gfs2_lookupi() uninitialised var fix

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=037bcbb7564e35aef937c54799550cd27735aac6
Commit: 037bcbb7564e35aef937c54799550cd27735aac6
Parent: c8cdf479377462315d6b4f56379f8ac989b0ef29
Author: [EMAIL PROTECTED] [EMAIL PROTECTED]
AuthorDate: Fri Jun 8 16:42:14 2007 -0700
Committer:  Steven Whitehouse [EMAIL PROTECTED]
CommitDate: Mon Jul 9 08:23:29 2007 +0100

[GFS2] gfs2_lookupi() uninitialised var fix

fs/gfs2/inode.c: In function 'gfs2_lookupi':
fs/gfs2/inode.c:392: warning: 'error' may be used uninitialized in this 
function

Looks like a real bug to me.

Cc: Steven Whitehouse [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Steven Whitehouse [EMAIL PROTECTED]
---
 fs/gfs2/inode.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index cacdb0d..366235d 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -389,7 +389,7 @@ struct inode *gfs2_lookupi(struct inode *dir, const struct 
qstr *name,
struct super_block *sb = dir-i_sb;
struct gfs2_inode *dip = GFS2_I(dir);
struct gfs2_holder d_gh;
-   int error;
+   int error = 0;
struct inode *inode = NULL;
int unlock = 0;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


rrunner.c:rr_init() must be __devinit

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4f092432bd443416b649519c3d5405aa55ad2d15
Commit: 4f092432bd443416b649519c3d5405aa55ad2d15
Parent: 9b5587cdd9f2a8dd4a010a93a6380051d43a3c16
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 14:44:47 2007 +0200
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:24:42 2007 -0400

rrunner.c:rr_init() must be __devinit

This patch fixes the following section mismatch:

--  snip  --

...
  MODPOST vmlinux
WARNING: drivers/built-in.o(.text+0x26e3f2): Section mismatch: reference to 
.init.text:rr_init (between 'rr_init_one' and 'rr_remove_one')
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/rrunner.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c
index 25c73d4..5c2e41f 100644
--- a/drivers/net/rrunner.c
+++ b/drivers/net/rrunner.c
@@ -516,7 +516,7 @@ static unsigned int write_eeprom(struct rr_private *rrpriv,
 }
 
 
-static int __init rr_init(struct net_device *dev)
+static int __devinit rr_init(struct net_device *dev)
 {
struct rr_private *rrpriv;
struct rr_regs __iomem *regs;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] No I/O ports on the DECstation

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d388d6853f1b584b8606cb3f2f9f9e4fa2e52258
Commit: d388d6853f1b584b8606cb3f2f9f9e4fa2e52258
Parent: b63e804459b9b550c1ab21a43e6bac2272e32612
Author: Maciej W. Rozycki [EMAIL PROTECTED]
AuthorDate: Tue May 29 15:08:07 2007 +0100
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:33:00 2007 +0100

[MIPS] No I/O ports on the DECstation

 There are no I/O ports on the DECstation whatsoever in any configuration
as neither the CPU nor the peripheral buses used have a concept of such.

Signed-off-by: Maciej W. Rozycki [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/Kconfig |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 734b61f..7080e71 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -63,6 +63,7 @@ config MACH_DECSTATION
bool DECstations
select BOOT_ELF32
select DMA_NONCOHERENT
+   select NO_IOPORT
select SYS_HAS_EARLY_PRINTK
select IRQ_CPU
select SYS_HAS_CPU_R3000
@@ -775,6 +776,9 @@ config MIPS_NILE4
 config MIPS_DISABLE_OBSOLETE_IDE
bool
 
+config NO_IOPORT
+   def_bool n
+
 config GENERIC_ISA_DMA_SUPPORT_BROKEN
bool
select ZONE_DMA
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GFS2] Use zero_user_page() in stuffed_readpage()

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2840501ac822c5bf712f67b4b02640e16e145a29
Commit: 2840501ac822c5bf712f67b4b02640e16e145a29
Parent: c4201214cbf10636e2c1ab9131573f735b42c8d4
Author: Steven Whitehouse [EMAIL PROTECTED]
AuthorDate: Mon Jun 18 16:31:42 2007 +0100
Committer:  Steven Whitehouse [EMAIL PROTECTED]
CommitDate: Mon Jul 9 08:23:45 2007 +0100

[GFS2] Use zero_user_page() in stuffed_readpage()

As suggested by Robert P. J. Day [EMAIL PROTECTED]

Signed-off-by: Steven Whitehouse [EMAIL PROTECTED]
Cc: Robert P. J. Day [EMAIL PROTECTED]
---
 fs/gfs2/ops_address.c |6 +-
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 9ab35a9..26c 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -208,11 +208,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct 
page *page)
 * so we need to supply one here. It doesn't happen often.
 */
if (unlikely(page-index)) {
-   kaddr = kmap_atomic(page, KM_USER0);
-   memset(kaddr, 0, PAGE_CACHE_SIZE);
-   kunmap_atomic(kaddr, KM_USER0);
-   flush_dcache_page(page);
-   SetPageUptodate(page);
+   zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
return 0;
}
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sdhci: Fix Unexpected interrupt handling

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9d26a5d3f2b9c4fe4b2ba491683c6989ecd6ae04
Commit: 9d26a5d3f2b9c4fe4b2ba491683c6989ecd6ae04
Parent: 8c75deae1ab99661975da098f8b721bafbb247c4
Author: Rolf Eike Beer [EMAIL PROTECTED]
AuthorDate: Tue Jun 26 13:31:16 2007 +0200
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Mon Jul 9 21:28:35 2007 +0200

sdhci: Fix Unexpected interrupt handling

Whenever a power interrupt is signaled it is also reported as an unexpected
one. All other unexpected interrupts get lost. Cause is a not inversed
bitmask to remove power interrupts from the status.

Signed-off-by: Rolf Eike Beer [EMAIL PROTECTED]
Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/host/sdhci.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 5e9a6ce..10d15c3 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1030,7 +1030,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
writel(SDHCI_INT_BUS_POWER, host-ioaddr + SDHCI_INT_STATUS);
}
 
-   intmask = SDHCI_INT_BUS_POWER;
+   intmask = ~SDHCI_INT_BUS_POWER;
 
if (intmask) {
printk(KERN_ERR %s: Unexpected interrupt 0x%08x.\n,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GFS2] set plock owner in GETLK info

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d88101d4d82ea09433692af30618c3b7afb7da02
Commit: d88101d4d82ea09433692af30618c3b7afb7da02
Parent: 037bcbb7564e35aef937c54799550cd27735aac6
Author: David Teigland [EMAIL PROTECTED]
AuthorDate: Fri Jun 8 16:00:22 2007 -0500
Committer:  Steven Whitehouse [EMAIL PROTECTED]
CommitDate: Mon Jul 9 08:23:31 2007 +0100

[GFS2] set plock owner in GETLK info

Set the owner field in the plock info sent to userspace for GETLK.
Without this, gfs_controld won't correctly see when the GETLK from a
process matches one of the process's existing locks.

Signed-off-by: David Teigland [EMAIL PROTECTED]
Signed-off-by: Steven Whitehouse [EMAIL PROTECTED]
---
 fs/gfs2/locking/dlm/plock.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/gfs2/locking/dlm/plock.c b/fs/gfs2/locking/dlm/plock.c
index f82495e..1dc7680 100644
--- a/fs/gfs2/locking/dlm/plock.c
+++ b/fs/gfs2/locking/dlm/plock.c
@@ -242,7 +242,7 @@ int gdlm_plock_get(void *lockspace, struct lm_lockname 
*name,
op-info.number = name-ln_number;
op-info.start  = fl-fl_start;
op-info.end= fl-fl_end;
-
+   op-info.owner  = (__u64)(long) fl-fl_owner;
 
send_op(op);
wait_event(recv_wq, (op-done != 0));
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[S390] Remove volatile from atomic_t

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=048d5ce6828b9071e241254c7dba13d67bfef2c3
Commit: 048d5ce6828b9071e241254c7dba13d67bfef2c3
Parent: dc4123303b54657389c952049bf5738dd753d004
Author: Heiko Carstens [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 11:24:16 2007 +0200
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Tue Jul 10 11:24:49 2007 +0200

[S390] Remove volatile from atomic_t

Follow i386/x86_64 and remove 'volatile' from atomic_t.

Signed-off-by: Heiko Carstens [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 include/asm-s390/atomic.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-s390/atomic.h b/include/asm-s390/atomic.h
index c17bdbf..ea48695 100644
--- a/include/asm-s390/atomic.h
+++ b/include/asm-s390/atomic.h
@@ -24,7 +24,7 @@
  */
 
 typedef struct {
-   volatile int counter;
+   int counter;
 } __attribute__ ((aligned (4))) atomic_t;
 #define ATOMIC_INIT(i)  { (i) }
 
@@ -141,7 +141,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, 
int u)
 
 #ifdef __s390x__
 typedef struct {
-   volatile long long counter;
+   long long counter;
 } __attribute__ ((aligned (8))) atomic64_t;
 #define ATOMIC64_INIT(i)  { (i) }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] SB1: Fix modpost warning.

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=62b396358e837549f20068ed9c3d2bcf99d9ad2d
Commit: 62b396358e837549f20068ed9c3d2bcf99d9ad2d
Parent: f2c4b47f26c9d3ba32fb51e574d8cacce30f744d
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 16:10:56 2007 +0100
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:33:05 2007 +0100

[MIPS] SB1: Fix modpost warning.

  MODPOST vmlinux
WARNING: arch/mips/mm/built-in.o(.text+0x1978): Section mismatch: reference 
to .init.text:except_vec2_sb1 (between 'sb1_cache_init' and 
'sb1_flush_cache_sigtramp')
WARNING: arch/mips/mm/built-in.o(.text+0x1988): Section mismatch: reference 
to .init.text:except_vec2_sb1 (between 'sb1_cache_init' and 
'sb1_flush_cache_sigtramp')

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/mm/c-sb1.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c
index 9ea460b..6f9bd7f 100644
--- a/arch/mips/mm/c-sb1.c
+++ b/arch/mips/mm/c-sb1.c
@@ -476,7 +476,7 @@ static __init void probe_cache_sizes(void)
  * memory management function pointers, as well as initialize
  * the caches and tlbs
  */
-void sb1_cache_init(void)
+void __init sb1_cache_init(void)
 {
extern char except_vec2_sb1;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cleanup usbnet_probe() return value handling

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9514bfe5d92000a9fd6f3c44aa775819b5d78aaf
Commit: 9514bfe5d92000a9fd6f3c44aa775819b5d78aaf
Parent: 4638aef1e2d8d938e52cd49f6492e9d414b38380
Author: Peter Korsgaard [EMAIL PROTECTED]
AuthorDate: Tue Jul 3 00:46:42 2007 +0200
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:41:18 2007 -0400

Cleanup usbnet_probe() return value handling

usbnet_probe() handles a positive return value from the driver bind()
function as success, but will later only setup the status handler if the
return value was zero, leading to confusion. Patch adjusts this to accept
positive values as success in both checks.

Signed-off-by: Peter Korsgaard [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/usb/usbnet.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 86b6908..37bf4f2 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1213,7 +1213,7 @@ usbnet_probe (struct usb_interface *udev, const struct 
usb_device_id *prod)
status = 0;
 
}
-   if (status == 0  dev-status)
+   if (status = 0  dev-status)
status = init_status (dev, udev);
if (status  0)
goto out3;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] Add generic GPIO support

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=096633358c907d9b50b00caf989816c2edfefe24
Commit: 096633358c907d9b50b00caf989816c2edfefe24
Parent: 4679258d52f6d4aeeafd5c77203d97ddf48e2db0
Author: Yoichi Yuasa [EMAIL PROTECTED]
AuthorDate: Tue May 22 00:05:58 2007 +0900
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:32:55 2007 +0100

[MIPS] Add generic GPIO support

Signed-off-by: Yoichi Yuasa [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/Kconfig   |3 +++
 include/asm-mips/gpio.h |6 ++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index c20cd90..1f2f7a9 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -778,6 +778,9 @@ config GENERIC_ISA_DMA_SUPPORT_BROKEN
bool
select ZONE_DMA
 
+config GENERIC_GPIO
+   bool
+
 #
 # Endianess selection.  Sufficiently obscure so many users don't know what to
 # answer,so we try hard to limit the available choices.  Also the use of a
diff --git a/include/asm-mips/gpio.h b/include/asm-mips/gpio.h
new file mode 100644
index 000..06e46fa
--- /dev/null
+++ b/include/asm-mips/gpio.h
@@ -0,0 +1,6 @@
+#ifndef __ASM_MIPS_GPIO_H
+#define __ASM_MIPS_GPIO_H
+
+#include gpio.h
+
+#endif /* __ASM_MIPS_GPIO_H */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


tokenring/3c359.c:xl_init() must be __devinit

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9b5587cdd9f2a8dd4a010a93a6380051d43a3c16
Commit: 9b5587cdd9f2a8dd4a010a93a6380051d43a3c16
Parent: 4e50a8e3c564add2f621dadb752a44872e93c754
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 14:44:37 2007 +0200
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:24:42 2007 -0400

tokenring/3c359.c:xl_init() must be __devinit

This patch fixes the following section mismatch:

--  snip  --

...
  MODPOST vmlinux
WARNING: drivers/built-in.o(.text+0x361ef1): Section mismatch: reference to 
.init.text:xl_init (between 'xl_probe' and 'xl_hw_reset')
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/tokenring/3c359.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
index e22a3f5..9f1b6ab 100644
--- a/drivers/net/tokenring/3c359.c
+++ b/drivers/net/tokenring/3c359.c
@@ -363,7 +363,7 @@ static int __devinit xl_probe(struct pci_dev *pdev,
 }
 
 
-static int __init xl_init(struct net_device *dev) 
+static int __devinit xl_init(struct net_device *dev) 
 {
struct xl_private *xl_priv = (struct xl_private *)dev-priv ;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sky2: remove some leftover debug messages

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e923d7b124d2b2218faac22714dc6e4639fab2e7
Commit: e923d7b124d2b2218faac22714dc6e4639fab2e7
Parent: 36eb0c71f3ab42b116a5a7bda733230014741632
Author: Stephen Hemminger [EMAIL PROTECTED]
AuthorDate: Mon Jul 9 15:33:43 2007 -0700
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:22:29 2007 -0400

sky2: remove some leftover debug messages

Eliminate extra debug messages

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/sky2.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 151d835..88f3ac2 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2058,8 +2058,6 @@ static struct sk_buff *receive_new(struct sky2_port *sky2,
struct sk_buff *skb, *nskb;
unsigned hdr_space = sky2-rx_data_size;
 
-   pr_debug(PFX receive new length=%d\n, length);
-
/* Don't be tricky about reusing pages (yet) */
nskb = sky2_rx_alloc(sky2);
if (unlikely(!nskb))
@@ -2728,8 +2726,6 @@ static void sky2_restart(struct work_struct *work)
struct net_device *dev;
int i, err;
 
-   dev_dbg(hw-pdev-dev, restarting\n);
-
del_timer_sync(hw-idle_timer);
 
rtnl_lock();
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] Make PAGE_OFFSET aware of PHYS_OFFSET

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=db38501511a7513ec4f0ae9922d847c135cf3c78
Commit: db38501511a7513ec4f0ae9922d847c135cf3c78
Parent: c4612c8596084c898628bd1898da5987ec43ac1d
Author: Franck Bui-Huu [EMAIL PROTECTED]
AuthorDate: Mon Jun 4 17:46:33 2007 +0200
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:32:57 2007 +0100

[MIPS] Make PAGE_OFFSET aware of PHYS_OFFSET

For platforms that use PHYS_OFFSET and do not use a mapped kernel,
this patch automatically adds PHYS_OFFSET into PAGE_OFFSET.
Therefore there are no more needs for them to redefine PAGE_OFFSET.

For mapped kernel, they need to redefine PAGE_OFFSET anyways.

Signed-off-by: Franck Bui-Huu [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/mach-generic/spaces.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-mips/mach-generic/spaces.h 
b/include/asm-mips/mach-generic/spaces.h
index d901e08..f0571b6 100644
--- a/include/asm-mips/mach-generic/spaces.h
+++ b/include/asm-mips/mach-generic/spaces.h
@@ -72,7 +72,7 @@
  * This handles the memory map.
  */
 #ifndef PAGE_OFFSET
-#define PAGE_OFFSETCAC_BASE
+#define PAGE_OFFSET(CAC_BASE + PHYS_OFFSET)
 #endif
 
 #endif /* __ASM_MACH_GENERIC_SPACES_H */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


atl1: remove write-only var in tx handler

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=89c0d26be7037cd5bbce3bbf12580ba70ed8f382
Commit: 89c0d26be7037cd5bbce3bbf12580ba70ed8f382
Parent: 099575b6cb7eaf18211ba72de56264f67651b90b
Author: Alexey Dobriyan [EMAIL PROTECTED]
AuthorDate: Fri Jul 6 19:05:25 2007 +0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:41:19 2007 -0400

atl1: remove write-only var in tx handler

Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/atl1/atl1_main.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 6862c11..3bb40dd 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -634,14 +634,13 @@ static void atl1_intr_tx(struct atl1_adapter *adapter)
struct atl1_buffer *buffer_info;
u16 sw_tpd_next_to_clean;
u16 cmb_tpd_next_to_clean;
-   u8 update = 0;
 
sw_tpd_next_to_clean = atomic_read(tpd_ring-next_to_clean);
cmb_tpd_next_to_clean = le16_to_cpu(adapter-cmb.cmb-tpd_cons_idx);
 
while (cmb_tpd_next_to_clean != sw_tpd_next_to_clean) {
struct tx_packet_desc *tpd;
-   update = 1;
+
tpd = ATL1_TPD_DESC(tpd_ring, sw_tpd_next_to_clean);
buffer_info = tpd_ring-buffer_info[sw_tpd_next_to_clean];
if (buffer_info-dma) {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[S390] vmlogrdr function annotation.

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f60d89108f3481ca11672b82cf7e67171e050ce4
Commit: f60d89108f3481ca11672b82cf7e67171e050ce4
Parent: dce554708cdb02a1053ca3a68997b9facbfde5ce
Author: Christian Borntraeger [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 11:24:22 2007 +0200
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Tue Jul 10 11:24:54 2007 +0200

[S390] vmlogrdr function annotation.

Use __init and __exit for vmlogrdr. Both functions are only referenced
by the module_init exit macros, so this change should be fine.

Acked-by: Stefan Weinhuber [EMAIL PROTECTED]
Signed-off-by: Christian Borntraeger [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 drivers/s390/char/vmlogrdr.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index a5a00e9..12f7a4c 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -835,7 +835,7 @@ static void vmlogrdr_cleanup(void)
 }
 
 
-static int vmlogrdr_init(void)
+static int __init vmlogrdr_init(void)
 {
int rc;
int i;
@@ -885,7 +885,7 @@ cleanup:
 }
 
 
-static void vmlogrdr_exit(void)
+static void __exit vmlogrdr_exit(void)
 {
vmlogrdr_cleanup();
printk (KERN_INFO vmlogrdr: driver unloaded\n);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Make a menuconfig out of the Kconfig objects menu, ..., endmenu,

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fd11d171e51a5b81c176d856d5df5612117e1a45
Commit: fd11d171e51a5b81c176d856d5df5612117e1a45
Parent: 5f5c926e3cba972636b50ab872b421e992d4f401
Author: Jan Engelhardt [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 12:26:06 2007 +0200
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Tue Jul 10 13:43:30 2007 +0200

Make a menuconfig out of the Kconfig objects menu, ..., endmenu,

so that the user can disable all the options in that menu at once
instead of having to disable each option separately.

Signed-off-by: Jan Engelhardt [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 drivers/block/Kconfig |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index d6ad7b3..6e23af1 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -2,9 +2,12 @@
 # Block device driver configuration
 #
 
-if BLOCK
+menuconfig BLK_DEV
+   bool Block devices
+   depends on BLOCK
+   default y
 
-menu Block devices
+if BLK_DEV
 
 config BLK_DEV_FD
tristate Normal floppy disk support
@@ -422,6 +425,4 @@ config ATA_OVER_ETH
 
 source drivers/s390/block/Kconfig
 
-endmenu
-
-endif
+endif # BLK_DEV
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sunhme.c:quattro_pci_find() must be __devinit

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cd6f5b8051efe03b90a1dd6d63a642f78ec4e60d
Commit: cd6f5b8051efe03b90a1dd6d63a642f78ec4e60d
Parent: c2edacf80e155ef54ae4774379d461b60896bc2e
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 14:44:49 2007 +0200
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:45:29 2007 -0400

sunhme.c:quattro_pci_find() must be __devinit

This patch fixes the following section mismatch:

--  snip  --

...
  MODPOST vmlinux
WARNING: drivers/built-in.o(.text+0x272f8b): Section mismatch: reference to 
.init.text:quattro_pci_find (between 'happy_meal_pci_probe' and 
'happy_meal_pci_remove')
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/sunhme.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index 51c3fe2..15146a1 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -2625,7 +2625,7 @@ static void quattro_sbus_free_irqs(void)
 #endif /* CONFIG_SBUS */
 
 #ifdef CONFIG_PCI
-static struct quattro * __init quattro_pci_find(struct pci_dev *pdev)
+static struct quattro * __devinit quattro_pci_find(struct pci_dev *pdev)
 {
struct pci_dev *bdev = pdev-bus-self;
struct quattro *qp;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


eeprom_93cx6: shorten pulse timing to match spec (bis)

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8abd531e3f77188de2fc41e677d075cc66e61631
Commit: 8abd531e3f77188de2fc41e677d075cc66e61631
Parent: 85cfb534280dd6a7c7ac399bb2888e1b8b286ece
Author: Francois Romieu [EMAIL PROTECTED]
AuthorDate: Wed Jul 4 00:31:44 2007 +0200
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:41:09 2007 -0400

eeprom_93cx6: shorten pulse timing to match spec (bis)

Based on an original idea by John W. Linville.

It is the missing part of 42d45ccd60636c28e35c2016f091783bc14ad99c

Signed-off-by: Francois Romieu [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/misc/eeprom_93cx6.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/misc/eeprom_93cx6.c b/drivers/misc/eeprom_93cx6.c
index ac515b0..ea55654 100644
--- a/drivers/misc/eeprom_93cx6.c
+++ b/drivers/misc/eeprom_93cx6.c
@@ -55,10 +55,10 @@ static inline void eeprom_93cx6_pulse_low(struct 
eeprom_93cx6 *eeprom)
 
/*
 * Add a short delay for the pulse to work.
-* According to the specifications the minimal time
-* should be 450ns so a 1us delay is sufficient.
+* According to the specifications the maximum minimum
+* time should be 450ns.
 */
-   udelay(1);
+   ndelay(450);
 }
 
 static void eeprom_93cx6_startup(struct eeprom_93cx6 *eeprom)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] Alchemy: Fix modpost warnings.

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=070c7b8611e852099370b17eaeb470407cb80ffe
Commit: 070c7b8611e852099370b17eaeb470407cb80ffe
Parent: 35c700c0955c43e168c45d375f90a0670be8f054
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 09:35:12 2007 +0100
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:33:05 2007 +0100

[MIPS] Alchemy: Fix modpost warnings.

  MODPOST vmlinux
WARNING: arch/mips/au1000/common/built-in.o(.text+0x1750): Section 
mismatch: reference to .init.data: (between 'au1xxx_platform_init' and 
'__fixup_bigphys_addr')
WARNING: arch/mips/au1000/common/built-in.o(.text+0x1754): Section 
mismatch: reference to .init.data: (between 'au1xxx_platform_init' and 
'__fixup_bigphys_addr')

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/au1000/common/platform.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/au1000/common/platform.c 
b/arch/mips/au1000/common/platform.c
index 8fd203d..d51e18f 100644
--- a/arch/mips/au1000/common/platform.c
+++ b/arch/mips/au1000/common/platform.c
@@ -289,7 +289,7 @@ static struct platform_device *au1xxx_platform_devices[] 
__initdata = {
 #endif
 };
 
-int au1xxx_platform_init(void)
+int __init au1xxx_platform_init(void)
 {
return platform_add_devices(au1xxx_platform_devices, 
ARRAY_SIZE(au1xxx_platform_devices));
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sis900_mii_probe() must be __devinit

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e50a8e3c564add2f621dadb752a44872e93c754
Commit: 4e50a8e3c564add2f621dadb752a44872e93c754
Parent: 8453d43f0ee08ac6c20f390797772a08f81f999a
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 14:44:35 2007 +0200
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:24:42 2007 -0400

sis900_mii_probe() must be __devinit

This patch fixes the following section mismatch:

--  snip  --

...
  MODPOST vmlinux
WARNING: drivers/built-in.o(.text+0x298170): Section mismatch: reference to 
.init.text:sis900_mii_probe (between 'sis900_probe' and 'sis900_default_phy')
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/sis900.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index 2cb2e15..7c6e480 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -573,7 +573,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
  * return error if it failed to found.
  */
 
-static int __init sis900_mii_probe(struct net_device * net_dev)
+static int __devinit sis900_mii_probe(struct net_device * net_dev)
 {
struct sis900_private * sis_priv = net_dev-priv;
const char *dev_name = pci_name(sis_priv-pci_dev);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] Create fallback gpio.h

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=82b8d2250c4b606e190853db9505b54b9fb71aa5
Commit: 82b8d2250c4b606e190853db9505b54b9fb71aa5
Parent: 096633358c907d9b50b00caf989816c2edfefe24
Author: Atsushi Nemoto [EMAIL PROTECTED]
AuthorDate: Fri Jun 22 23:20:23 2007 +0900
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:32:56 2007 +0100

[MIPS] Create fallback gpio.h

Create fallback gpio.h which only contains prototypes for gpio API.

Signed-off-by: Atsushi Nemoto [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/mach-generic/gpio.h |   15 +++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/include/asm-mips/mach-generic/gpio.h 
b/include/asm-mips/mach-generic/gpio.h
new file mode 100644
index 000..6eaf5ef
--- /dev/null
+++ b/include/asm-mips/mach-generic/gpio.h
@@ -0,0 +1,15 @@
+#ifndef __ASM_MACH_GENERIC_GPIO_H
+#define __ASM_MACH_GENERIC_GPIO_H
+
+int gpio_request(unsigned gpio, const char *label);
+void gpio_free(unsigned gpio);
+int gpio_direction_input(unsigned gpio);
+int gpio_direction_output(unsigned gpio, int value);
+int gpio_get_value(unsigned gpio);
+void gpio_set_value(unsigned gpio, int value);
+int gpio_to_irq(unsigned gpio);
+int irq_to_gpio(unsigned irq);
+
+#include asm-generic/gpio.h  /* cansleep wrappers */
+
+#endif /* __ASM_MACH_GENERIC_GPIO_H */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sky2: check drop truncated packets

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=71749531f2d1954137a1a77422ef4ff29eb102dd
Commit: 71749531f2d1954137a1a77422ef4ff29eb102dd
Parent: f4331a6d24f2e5524678caf4621d35f33fb934da
Author: Stephen Hemminger [EMAIL PROTECTED]
AuthorDate: Mon Jul 9 15:33:40 2007 -0700
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Jul 10 12:22:29 2007 -0400

sky2: check drop truncated packets

If packet larger than MTU is received, the driver uses hardware to
truncate the packet. Use the status registers to catch/drop them.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/sky2.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 99a9993..4e0b839 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2109,6 +2109,9 @@ static struct sk_buff *sky2_receive(struct net_device 
*dev,
if (!(status  GMR_FS_RX_OK))
goto resubmit;
 
+   if (status  16 != length)
+   goto len_mismatch;
+
if (length  copybreak)
skb = receive_copy(sky2, re, length);
else
@@ -2118,6 +2121,11 @@ resubmit:
 
return skb;
 
+len_mismatch:
+   /* Truncation of overlength packets
+  causes PHY length to not match MAC length */
+   ++sky2-net_stats.rx_length_errors;
+
 error:
++sky2-net_stats.rx_errors;
if (status  GMR_FS_RX_FF_OV) {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] PNX: Fix modpost warnings.

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f2c4b47f26c9d3ba32fb51e574d8cacce30f744d
Commit: f2c4b47f26c9d3ba32fb51e574d8cacce30f744d
Parent: 070c7b8611e852099370b17eaeb470407cb80ffe
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 15:04:06 2007 +0100
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jul 10 17:33:05 2007 +0100

[MIPS] PNX: Fix modpost warnings.

  MODPOST vmlinux
WARNING: arch/mips/philips/pnx8550/common/built-in.o(.text+0xd40): Section 
mismatch: reference to .init.data: (after 'pnx8550_platform_init')
WARNING: arch/mips/philips/pnx8550/common/built-in.o(.text+0xd44): Section 
mismatch: reference to .init.data: (after 'pnx8550_platform_init')

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/philips/pnx8550/common/platform.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/philips/pnx8550/common/platform.c 
b/arch/mips/philips/pnx8550/common/platform.c
index d43f56e..c839436 100644
--- a/arch/mips/philips/pnx8550/common/platform.c
+++ b/arch/mips/philips/pnx8550/common/platform.c
@@ -123,7 +123,7 @@ static struct platform_device *pnx8550_platform_devices[] 
__initdata = {
pnx8550_uart_device,
 };
 
-int pnx8550_platform_init(void)
+static int __init pnx8550_platform_init(void)
 {
return platform_add_devices(pnx8550_platform_devices,
ARRAY_SIZE(pnx8550_platform_devices));
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[S390] vmcp cleanup

2007-07-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d197e6921843932b5d8ecf47d23fcac62e73b19a
Commit: d197e6921843932b5d8ecf47d23fcac62e73b19a
Parent: 71780f59e127bb281a9302d430495ca9586c14e7
Author: Robert P. J. Day [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 11:24:07 2007 +0200
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Tue Jul 10 11:24:41 2007 +0200

[S390] vmcp cleanup

No need to use the  prefix and, since you're calling nonseekable_open(),
there is no need to use no_llseek().

Signed-off-by: Robert P. J. Day [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 drivers/s390/char/vmcp.c |   13 ++---
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c
index fce3dac..82e6a6b 100644
--- a/drivers/s390/char/vmcp.c
+++ b/drivers/s390/char/vmcp.c
@@ -175,13 +175,12 @@ static long vmcp_ioctl(struct file *file, unsigned int 
cmd, unsigned long arg)
 
 static const struct file_operations vmcp_fops = {
.owner  = THIS_MODULE,
-   .open   = vmcp_open,
-   .release= vmcp_release,
-   .read   = vmcp_read,
-   .llseek = no_llseek,
-   .write  = vmcp_write,
-   .unlocked_ioctl = vmcp_ioctl,
-   .compat_ioctl   = vmcp_ioctl
+   .open   = vmcp_open,
+   .release= vmcp_release,
+   .read   = vmcp_read,
+   .write  = vmcp_write,
+   .unlocked_ioctl = vmcp_ioctl,
+   .compat_ioctl   = vmcp_ioctl
 };
 
 static struct miscdevice vmcp_dev = {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  1   2   3   >