diff options
| author | Johan Hovold <jhovold@gmail.com> | 2013-07-27 07:34:42 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-28 14:32:18 -0400 |
| commit | 683a0e4d7971c3186dc4d429027debfe309129aa (patch) | |
| tree | 246f023d09e35af3f8a8b344f804e6bab35be8ca | |
| parent | 05cf0dec5ccc696a7636c84b265b477173498156 (diff) | |
USB: mos7840: fix pointer casts
Silence compiler warnings on 64-bit systems introduced by commit
05cf0dec ("USB: mos7840: fix race in led handling") which uses the
usb-serial data pointer to temporarily store the device type during
probe but failed to add the required casts.
[gregkh - change uintptr_t to unsigned long]
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/usb/serial/mos7840.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index c10fc15bf851..d953d674f222 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
| @@ -2221,14 +2221,14 @@ static int mos7840_probe(struct usb_serial *serial, | |||
| 2221 | 2221 | ||
| 2222 | kfree(buf); | 2222 | kfree(buf); |
| 2223 | out: | 2223 | out: |
| 2224 | usb_set_serial_data(serial, (void *)device_type); | 2224 | usb_set_serial_data(serial, (void *)(unsigned long)device_type); |
| 2225 | 2225 | ||
| 2226 | return 0; | 2226 | return 0; |
| 2227 | } | 2227 | } |
| 2228 | 2228 | ||
| 2229 | static int mos7840_calc_num_ports(struct usb_serial *serial) | 2229 | static int mos7840_calc_num_ports(struct usb_serial *serial) |
| 2230 | { | 2230 | { |
| 2231 | int device_type = (int)usb_get_serial_data(serial); | 2231 | int device_type = (unsigned long)usb_get_serial_data(serial); |
| 2232 | int mos7840_num_ports; | 2232 | int mos7840_num_ports; |
| 2233 | 2233 | ||
| 2234 | mos7840_num_ports = (device_type >> 4) & 0x000F; | 2234 | mos7840_num_ports = (device_type >> 4) & 0x000F; |
| @@ -2239,7 +2239,7 @@ static int mos7840_calc_num_ports(struct usb_serial *serial) | |||
| 2239 | static int mos7840_port_probe(struct usb_serial_port *port) | 2239 | static int mos7840_port_probe(struct usb_serial_port *port) |
| 2240 | { | 2240 | { |
| 2241 | struct usb_serial *serial = port->serial; | 2241 | struct usb_serial *serial = port->serial; |
| 2242 | int device_type = (int)usb_get_serial_data(serial); | 2242 | int device_type = (unsigned long)usb_get_serial_data(serial); |
| 2243 | struct moschip_port *mos7840_port; | 2243 | struct moschip_port *mos7840_port; |
| 2244 | int status; | 2244 | int status; |
| 2245 | int pnum; | 2245 | int pnum; |
