UPSTREAM: video / backlight: remove the backlight_device_registered API
authorAaron Lu <aaron.lu@intel.com>
Wed, 27 Apr 2016 12:45:03 +0000 (20:45 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 6 Mar 2017 10:28:40 +0000 (18:28 +0800)
Since we will need the backlight_device_get_by_type API, we can use it
instead of the backlight_device_registered API whenever necessary so
remove the backlight_device_registered API.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 01c3664de62f89f6777e59173ad8e20b5a4c267f)

Change-Id: I12fdee74963c2cbc5b950019598ec218de1b7b5d
Signed-off-by: David Wu <david.wu@rock-chips.com>
drivers/acpi/video_detect.c
drivers/video/backlight/backlight.c
include/linux/backlight.h

index b48ecbfc4498890be2de685f6a52bf27badb0904..ed0f67d6072a20c0e7d214976da25c2904932d2c 100644 (file)
@@ -361,7 +361,7 @@ enum acpi_backlight_type acpi_video_get_backlight_type(void)
        if (!(video_caps & ACPI_VIDEO_BACKLIGHT))
                return acpi_backlight_vendor;
 
-       if (acpi_osi_is_win8() && backlight_device_registered(BACKLIGHT_RAW))
+       if (acpi_osi_is_win8() && backlight_device_get_by_type(BACKLIGHT_RAW))
                return acpi_backlight_native;
 
        return acpi_backlight_video;
index 9bf81e03e0d959e9143942b1b81ddd6a9989b99e..932396db09292a4b3007dc49bca4683f83333935 100644 (file)
@@ -410,12 +410,6 @@ struct backlight_device *backlight_device_get_by_type(enum backlight_type type)
 }
 EXPORT_SYMBOL(backlight_device_get_by_type);
 
-bool backlight_device_registered(enum backlight_type type)
-{
-       return backlight_device_get_by_type(type) ? true : false;
-}
-EXPORT_SYMBOL(backlight_device_registered);
-
 /**
  * backlight_device_unregister - unregisters a backlight device object.
  * @bd: the backlight device object to be unregistered and freed.
index f46b88fa4a098774f58879c9976be4aefb128591..5f2fd61ef4fb12ec52d3384abab93fabd87c084a 100644 (file)
@@ -141,7 +141,6 @@ extern void devm_backlight_device_unregister(struct device *dev,
                                        struct backlight_device *bd);
 extern void backlight_force_update(struct backlight_device *bd,
                                   enum backlight_update_reason reason);
-extern bool backlight_device_registered(enum backlight_type type);
 extern int backlight_register_notifier(struct notifier_block *nb);
 extern int backlight_unregister_notifier(struct notifier_block *nb);
 extern struct backlight_device *backlight_device_get_by_type(enum backlight_type type);