mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge branch 'akpm' (updates from Andrew Morton)
Merge first patch-bomb from Andrew Morton: - various misc bits - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been distracted. There has been quite a bit of activity. - About half the MM queue - Some backlight bits - Various lib/ updates - checkpatch updates - zillions more little rtc patches - ptrace - signals - exec - procfs - rapidio - nbd - aoe - pps - memstick - tools/testing/selftests updates * emailed patches from Andrew Morton <[email protected]>: (445 commits) tools/testing/selftests: don't assume the x bit is set on scripts selftests: add .gitignore for kcmp selftests: fix clean target in kcmp Makefile selftests: add .gitignore for vm selftests: add hugetlbfstest self-test: fix make clean selftests: exit 1 on failure kernel/resource.c: remove the unneeded assignment in function __find_resource aio: fix wrong comment in aio_complete() drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode drivers/memstick/host/r592.c: convert to module_pci_driver drivers/memstick/host/jmb38x_ms: convert to module_pci_driver pps-gpio: add device-tree binding and support drivers/pps/clients/pps-gpio.c: convert to module_platform_driver drivers/pps/clients/pps-gpio.c: convert to devm_* helpers drivers/parport/share.c: use kzalloc Documentation/accounting/getdelays.c: avoid strncpy in accounting tool aoe: update internal version number to v83 aoe: update copyright date aoe: perform I/O completions in parallel ...
This commit is contained in:
commit
7f0ef0267e
429 changed files with 6278 additions and 4934 deletions
|
|
@ -195,7 +195,6 @@ static int __init atmel_pwm_bl_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
err_free_bl_dev:
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
backlight_device_unregister(bldev);
|
||||
err_free_pwm:
|
||||
pwm_channel_free(&pwmbl->pwmc);
|
||||
|
|
@ -212,7 +211,6 @@ static int __exit atmel_pwm_bl_remove(struct platform_device *pdev)
|
|||
pwm_channel_disable(&pwmbl->pwmc);
|
||||
pwm_channel_free(&pwmbl->pwmc);
|
||||
backlight_device_unregister(pwmbl->bldev);
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,7 +208,8 @@ static ssize_t backlight_show_actual_brightness(struct device *dev,
|
|||
|
||||
static struct class *backlight_class;
|
||||
|
||||
static int backlight_suspend(struct device *dev, pm_message_t state)
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int backlight_suspend(struct device *dev)
|
||||
{
|
||||
struct backlight_device *bd = to_backlight_device(dev);
|
||||
|
||||
|
|
@ -235,6 +236,10 @@ static int backlight_resume(struct device *dev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(backlight_class_dev_pm_ops, backlight_suspend,
|
||||
backlight_resume);
|
||||
|
||||
static void bl_device_release(struct device *dev)
|
||||
{
|
||||
|
|
@ -304,7 +309,7 @@ struct backlight_device *backlight_device_register(const char *name,
|
|||
new_bd->dev.class = backlight_class;
|
||||
new_bd->dev.parent = parent;
|
||||
new_bd->dev.release = bl_device_release;
|
||||
dev_set_name(&new_bd->dev, name);
|
||||
dev_set_name(&new_bd->dev, "%s", name);
|
||||
dev_set_drvdata(&new_bd->dev, devdata);
|
||||
|
||||
/* Set default properties */
|
||||
|
|
@ -370,6 +375,81 @@ void backlight_device_unregister(struct backlight_device *bd)
|
|||
}
|
||||
EXPORT_SYMBOL(backlight_device_unregister);
|
||||
|
||||
static void devm_backlight_device_release(struct device *dev, void *res)
|
||||
{
|
||||
struct backlight_device *backlight = *(struct backlight_device **)res;
|
||||
|
||||
backlight_device_unregister(backlight);
|
||||
}
|
||||
|
||||
static int devm_backlight_device_match(struct device *dev, void *res,
|
||||
void *data)
|
||||
{
|
||||
struct backlight_device **r = res;
|
||||
|
||||
return *r == data;
|
||||
}
|
||||
|
||||
/**
|
||||
* devm_backlight_device_register - resource managed backlight_device_register()
|
||||
* @dev: the device to register
|
||||
* @name: the name of the device
|
||||
* @parent: a pointer to the parent device
|
||||
* @devdata: an optional pointer to be stored for private driver use
|
||||
* @ops: the backlight operations structure
|
||||
* @props: the backlight properties
|
||||
*
|
||||
* @return a struct backlight on success, or an ERR_PTR on error
|
||||
*
|
||||
* Managed backlight_device_register(). The backlight_device returned
|
||||
* from this function are automatically freed on driver detach.
|
||||
* See backlight_device_register() for more information.
|
||||
*/
|
||||
struct backlight_device *devm_backlight_device_register(struct device *dev,
|
||||
const char *name, struct device *parent, void *devdata,
|
||||
const struct backlight_ops *ops,
|
||||
const struct backlight_properties *props)
|
||||
{
|
||||
struct backlight_device **ptr, *backlight;
|
||||
|
||||
ptr = devres_alloc(devm_backlight_device_release, sizeof(*ptr),
|
||||
GFP_KERNEL);
|
||||
if (!ptr)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
backlight = backlight_device_register(name, parent, devdata, ops,
|
||||
props);
|
||||
if (!IS_ERR(backlight)) {
|
||||
*ptr = backlight;
|
||||
devres_add(dev, ptr);
|
||||
} else {
|
||||
devres_free(ptr);
|
||||
}
|
||||
|
||||
return backlight;
|
||||
}
|
||||
EXPORT_SYMBOL(devm_backlight_device_register);
|
||||
|
||||
/**
|
||||
* devm_backlight_device_unregister - resource managed backlight_device_unregister()
|
||||
* @dev: the device to unregister
|
||||
* @bd: the backlight device to unregister
|
||||
*
|
||||
* Deallocated a backlight allocated with devm_backlight_device_register().
|
||||
* Normally this function will not need to be called and the resource management
|
||||
* code will ensure that the resource is freed.
|
||||
*/
|
||||
void devm_backlight_device_unregister(struct device *dev,
|
||||
struct backlight_device *bd)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = devres_release(dev, devm_backlight_device_release,
|
||||
devm_backlight_device_match, bd);
|
||||
WARN_ON(rc);
|
||||
}
|
||||
EXPORT_SYMBOL(devm_backlight_device_unregister);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static int of_parent_match(struct device *dev, const void *data)
|
||||
{
|
||||
|
|
@ -414,8 +494,7 @@ static int __init backlight_class_init(void)
|
|||
}
|
||||
|
||||
backlight_class->dev_attrs = bl_device_attributes;
|
||||
backlight_class->suspend = backlight_suspend;
|
||||
backlight_class->resume = backlight_resume;
|
||||
backlight_class->pm = &backlight_class_dev_pm_ops;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,6 @@ static int ep93xxbl_remove(struct platform_device *dev)
|
|||
struct backlight_device *bl = platform_get_drvdata(dev);
|
||||
|
||||
backlight_device_unregister(bl);
|
||||
platform_set_drvdata(dev, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ struct lcd_device *lcd_device_register(const char *name, struct device *parent,
|
|||
new_ld->dev.class = lcd_class;
|
||||
new_ld->dev.parent = parent;
|
||||
new_ld->dev.release = lcd_device_release;
|
||||
dev_set_name(&new_ld->dev, name);
|
||||
dev_set_name(&new_ld->dev, "%s", name);
|
||||
dev_set_drvdata(&new_ld->dev, devdata);
|
||||
|
||||
rc = device_register(&new_ld->dev);
|
||||
|
|
@ -260,6 +260,76 @@ void lcd_device_unregister(struct lcd_device *ld)
|
|||
}
|
||||
EXPORT_SYMBOL(lcd_device_unregister);
|
||||
|
||||
static void devm_lcd_device_release(struct device *dev, void *res)
|
||||
{
|
||||
struct lcd_device *lcd = *(struct lcd_device **)res;
|
||||
|
||||
lcd_device_unregister(lcd);
|
||||
}
|
||||
|
||||
static int devm_lcd_device_match(struct device *dev, void *res, void *data)
|
||||
{
|
||||
struct lcd_device **r = res;
|
||||
|
||||
return *r == data;
|
||||
}
|
||||
|
||||
/**
|
||||
* devm_lcd_device_register - resource managed lcd_device_register()
|
||||
* @dev: the device to register
|
||||
* @name: the name of the device
|
||||
* @parent: a pointer to the parent device
|
||||
* @devdata: an optional pointer to be stored for private driver use
|
||||
* @ops: the lcd operations structure
|
||||
*
|
||||
* @return a struct lcd on success, or an ERR_PTR on error
|
||||
*
|
||||
* Managed lcd_device_register(). The lcd_device returned from this function
|
||||
* are automatically freed on driver detach. See lcd_device_register()
|
||||
* for more information.
|
||||
*/
|
||||
struct lcd_device *devm_lcd_device_register(struct device *dev,
|
||||
const char *name, struct device *parent,
|
||||
void *devdata, struct lcd_ops *ops)
|
||||
{
|
||||
struct lcd_device **ptr, *lcd;
|
||||
|
||||
ptr = devres_alloc(devm_lcd_device_release, sizeof(*ptr), GFP_KERNEL);
|
||||
if (!ptr)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
lcd = lcd_device_register(name, parent, devdata, ops);
|
||||
if (!IS_ERR(lcd)) {
|
||||
*ptr = lcd;
|
||||
devres_add(dev, ptr);
|
||||
} else {
|
||||
devres_free(ptr);
|
||||
}
|
||||
|
||||
return lcd;
|
||||
}
|
||||
EXPORT_SYMBOL(devm_lcd_device_register);
|
||||
|
||||
/**
|
||||
* devm_lcd_device_unregister - resource managed lcd_device_unregister()
|
||||
* @dev: the device to unregister
|
||||
* @ld: the lcd device to unregister
|
||||
*
|
||||
* Deallocated a lcd allocated with devm_lcd_device_register(). Normally
|
||||
* this function will not need to be called and the resource management
|
||||
* code will ensure that the resource is freed.
|
||||
*/
|
||||
void devm_lcd_device_unregister(struct device *dev, struct lcd_device *ld)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = devres_release(dev, devm_lcd_device_release,
|
||||
devm_lcd_device_match, ld);
|
||||
WARN_ON(rc);
|
||||
}
|
||||
EXPORT_SYMBOL(devm_lcd_device_unregister);
|
||||
|
||||
|
||||
static void __exit lcd_class_exit(void)
|
||||
{
|
||||
class_destroy(lcd_class);
|
||||
|
|
|
|||
|
|
@ -312,7 +312,6 @@ static int lp8788_backlight_remove(struct platform_device *pdev)
|
|||
backlight_update_status(bl_dev);
|
||||
sysfs_remove_group(&pdev->dev.kobj, &lp8788_attr_group);
|
||||
lp8788_backlight_unregister(bl);
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,8 +153,6 @@ static int pcf50633_bl_remove(struct platform_device *pdev)
|
|||
|
||||
backlight_device_unregister(pcf_bl->bl);
|
||||
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ struct output_device *video_output_register(const char *name,
|
|||
new_dev->props = op;
|
||||
new_dev->dev.class = &video_output_class;
|
||||
new_dev->dev.parent = dev;
|
||||
dev_set_name(&new_dev->dev, name);
|
||||
dev_set_name(&new_dev->dev, "%s", name);
|
||||
dev_set_drvdata(&new_dev->dev, devdata);
|
||||
ret_code = device_register(&new_dev->dev);
|
||||
if (ret_code) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue