]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
USB: Fix pointer/int cast in USB devio code
authorDavid Howells <dhowells@redhat.com>
Wed, 2 Jul 2008 11:28:55 +0000 (12:28 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Jul 2008 22:16:44 +0000 (15:16 -0700)
commita80d5ff0d7d3a99e962a02c36acf97ba5a70b86e
treec8024d773006bf61126509cb8292d1341ac4dd2f
parent4ddd9ec17af6a7c539f4a12758905340c00847d6
USB: Fix pointer/int cast in USB devio code

Fix pointer/int cast in USB devio code, and thus avoid a compiler warning.

A void* data argument passed to bus_find_device() and thence to match_devt()
is used to carry a 32-bit datum.  However, casting directly between a u32 and
a pointer is not permitted - there must be an intermediate cast via (unsigned)
long.

This was introduced by the following patch:

commit 94b1c9fa060ece2c8f080583beb6cc6008e41413
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Tue Jun 24 14:47:12 2008 -0400

    usbfs: simplify the lookup-by-minor routines

    This patch (as1105) simplifies the lookup-by-minor-number code in
    usbfs.  Instead of passing the minor number to the callback, which
    must then reconstruct the entire dev_t value, the patch passes the
    dev_t value directly.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c