if (!bd->props->check_fb ||
bd->props->check_fb(evdata->info)) {
bd->props->fb_blank = *(int *)evdata->data;
- if (likely(bd->props && bd->props->update_status))
+ if (bd->props && bd->props->update_status)
bd->props->update_status(bd);
}
up(&bd->sem);
struct backlight_device *bd = to_backlight_device(cdev);
down(&bd->sem);
- if (likely(bd->props))
+ if (bd->props)
rc = sprintf(buf, "%d\n", bd->props->power);
up(&bd->sem);
return -EINVAL;
down(&bd->sem);
- if (likely(bd->props)) {
+ if (bd->props) {
pr_debug("backlight: set power to %d\n", power);
bd->props->power = power;
- if (likely(bd->props->update_status))
+ if (bd->props->update_status)
bd->props->update_status(bd);
rc = count;
}
struct backlight_device *bd = to_backlight_device(cdev);
down(&bd->sem);
- if (likely(bd->props))
+ if (bd->props)
rc = sprintf(buf, "%d\n", bd->props->brightness);
up(&bd->sem);
return -EINVAL;
down(&bd->sem);
- if (likely(bd->props)) {
+ if (bd->props) {
if (brightness > bd->props->max_brightness)
rc = -EINVAL;
else {
pr_debug("backlight: set brightness to %d\n",
brightness);
bd->props->brightness = brightness;
- if (likely(bd->props->update_status))
+ if (bd->props->update_status)
bd->props->update_status(bd);
rc = count;
}
struct backlight_device *bd = to_backlight_device(cdev);
down(&bd->sem);
- if (likely(bd->props))
+ if (bd->props)
rc = sprintf(buf, "%d\n", bd->props->max_brightness);
up(&bd->sem);
struct backlight_device *bd = to_backlight_device(cdev);
down(&bd->sem);
- if (likely(bd->props && bd->props->get_brightness))
+ if (bd->props && bd->props->get_brightness)
rc = sprintf(buf, "%d\n", bd->props->get_brightness(bd));
up(&bd->sem);
pr_debug("backlight_device_alloc: name=%s\n", name);
new_bd = kmalloc(sizeof(struct backlight_device), GFP_KERNEL);
- if (unlikely(!new_bd))
+ if (!new_bd)
return ERR_PTR(-ENOMEM);
init_MUTEX(&new_bd->sem);
class_set_devdata(&new_bd->class_dev, devdata);
rc = class_device_register(&new_bd->class_dev);
- if (unlikely(rc)) {
+ if (rc) {
kfree(new_bd);
return ERR_PTR(rc);
}
for (i = 0; i < ARRAY_SIZE(bl_class_device_attributes); i++) {
rc = class_device_create_file(&new_bd->class_dev,
&bl_class_device_attributes[i]);
- if (unlikely(rc)) {
+ if (rc) {
while (--i >= 0)
class_device_remove_file(&new_bd->class_dev,
&bl_class_device_attributes[i]);
struct lcd_device *ld = to_lcd_device(cdev);
down(&ld->sem);
- if (likely(ld->props && ld->props->get_power))
+ if (ld->props && ld->props->get_power)
rc = sprintf(buf, "%d\n", ld->props->get_power(ld));
else
rc = -ENXIO;
return -EINVAL;
down(&ld->sem);
- if (likely(ld->props && ld->props->set_power)) {
+ if (ld->props && ld->props->set_power) {
pr_debug("lcd: set power to %d\n", power);
ld->props->set_power(ld, power);
rc = count;
struct lcd_device *ld = to_lcd_device(cdev);
down(&ld->sem);
- if (likely(ld->props && ld->props->get_contrast))
+ if (ld->props && ld->props->get_contrast)
rc = sprintf(buf, "%d\n", ld->props->get_contrast(ld));
up(&ld->sem);
return -EINVAL;
down(&ld->sem);
- if (likely(ld->props && ld->props->set_contrast)) {
+ if (ld->props && ld->props->set_contrast) {
pr_debug("lcd: set contrast to %d\n", contrast);
ld->props->set_contrast(ld, contrast);
rc = count;
struct lcd_device *ld = to_lcd_device(cdev);
down(&ld->sem);
- if (likely(ld->props))
+ if (ld->props)
rc = sprintf(buf, "%d\n", ld->props->max_contrast);
up(&ld->sem);
pr_debug("lcd_device_register: name=%s\n", name);
new_ld = kmalloc(sizeof(struct lcd_device), GFP_KERNEL);
- if (unlikely(!new_ld))
+ if (!new_ld)
return ERR_PTR(-ENOMEM);
init_MUTEX(&new_ld->sem);
class_set_devdata(&new_ld->class_dev, devdata);
rc = class_device_register(&new_ld->class_dev);
- if (unlikely(rc)) {
+ if (rc) {
kfree(new_ld);
return ERR_PTR(rc);
}
for (i = 0; i < ARRAY_SIZE(lcd_class_device_attributes); i++) {
rc = class_device_create_file(&new_ld->class_dev,
&lcd_class_device_attributes[i]);
- if (unlikely(rc)) {
+ if (rc) {
while (--i >= 0)
class_device_remove_file(&new_ld->class_dev,
&lcd_class_device_attributes[i]);