05 Jan, 2006

1 commit


10 Nov, 2005

1 commit

  • Introduce struct platform_driver. This allows the platform device
    driver methods to be passed a platform_device structure instead of
    instead of a plain device structure, and therefore requiring casting
    in every platform driver.

    We introduce this in such a way that any existing platform drivers
    registered directly via driver_register continue to work as before,
    thereby allowing a gradual conversion to the new platform_driver
    methods.

    Signed-off-by: Russell King
    Acked-by: Greg Kroah-Hartman

    Russell King
     

06 Nov, 2005

1 commit

  • Re-jig the simple platform device support to allow private data
    to be attached to a platform device, as well as allowing the
    parent device to be set.

    Example usage:

    pdev = platform_device_alloc("mydev", id);
    if (pdev) {
    err = platform_device_add_resources(pdev, &resources,
    ARRAY_SIZE(resources));
    if (err == 0)
    err = platform_device_add_data(pdev, &platform_data,
    sizeof(platform_data));
    if (err == 0)
    err = platform_device_add(pdev);
    } else {
    err = -ENOMEM;
    }
    if (err)
    platform_device_put(pdev);

    Signed-off-by: Russell King
    Acked-by: Greg Kroah-Hartman

    Russell King
     

30 Oct, 2005

1 commit