lkml.org 
[lkml]   [2007]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 10/14] Convert from class_device to device for USB core
    -- 
    Content-Disposition: inline; filename=usb-core.patch

    Convert from class_device to device for drivers/ide/usb/core. Greg, not
    sure if you're looking for a patch for this. Kay mentioned maybe it was to
    be superceded by a diff mechanism. Free free to drop if so.

    ---
    drivers/usb/core/hcd.c | 12 ++++++------
    include/linux/usb.h | 2 +-
    2 files changed, 7 insertions(+), 7 deletions(-)

    --- a/drivers/usb/core/hcd.c
    +++ b/drivers/usb/core/hcd.c
    @@ -739,15 +739,15 @@ static int usb_register_bus(struct usb_b
    return -E2BIG;
    }

    - bus->class_dev = class_device_create(usb_host_class, NULL, MKDEV(0,0),
    - bus->controller, "usb_host%d", busnum);
    - if (IS_ERR(bus->class_dev)) {
    + bus->dev = device_create(usb_host_class, bus->controller, MKDEV(0,0),
    + "usb_host%d", busnum);
    + if (IS_ERR(bus->dev)) {
    clear_bit(busnum, busmap.busmap);
    mutex_unlock(&usb_bus_list_lock);
    - return PTR_ERR(bus->class_dev);
    + return PTR_ERR(bus->dev);
    }

    - class_set_devdata(bus->class_dev, bus);
    + dev_set_drvdata(bus->dev, bus);

    /* Add it to the local list of buses */
    list_add (&bus->bus_list, &usb_bus_list);
    @@ -784,7 +784,7 @@ static void usb_deregister_bus (struct u

    clear_bit (bus->busnum, busmap.busmap);

    - class_device_unregister(bus->class_dev);
    + device_unregister(bus->dev);
    }

    /**
    --- a/include/linux/usb.h
    +++ b/include/linux/usb.h
    @@ -314,7 +314,7 @@ struct usb_bus {
    #ifdef CONFIG_USB_DEVICEFS
    struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */
    #endif
    - struct class_device *class_dev; /* class device for this bus */
    + struct device *dev; /* device for this bus */

    #if defined(CONFIG_USB_MON)
    struct mon_bus *mon_bus; /* non-null when associated */
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-08-21 00:59    [W:0.023 / U:0.024 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site