aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2016-04-27 08:45:03 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-05-04 17:41:14 -0400
commit01c3664de62f89f6777e59173ad8e20b5a4c267f (patch)
tree3c3ea42d9813632552043ed0210eaf91393d1d58
parentf6a4790a5471d7cba406d87f6b41323f40bb93d2 (diff)
video / backlight: remove the backlight_device_registered API
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>
-rw-r--r--drivers/acpi/video_detect.c2
-rw-r--r--drivers/video/backlight/backlight.c6
-rw-r--r--include/linux/backlight.h1
3 files changed, 1 insertions, 8 deletions
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 1316ddd92fac..3d1327615f72 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -358,7 +358,7 @@ enum acpi_backlight_type acpi_video_get_backlight_type(void)
358 if (!(video_caps & ACPI_VIDEO_BACKLIGHT)) 358 if (!(video_caps & ACPI_VIDEO_BACKLIGHT))
359 return acpi_backlight_vendor; 359 return acpi_backlight_vendor;
360 360
361 if (acpi_osi_is_win8() && backlight_device_registered(BACKLIGHT_RAW)) 361 if (acpi_osi_is_win8() && backlight_device_get_by_type(BACKLIGHT_RAW))
362 return acpi_backlight_native; 362 return acpi_backlight_native;
363 363
364 return acpi_backlight_video; 364 return acpi_backlight_video;
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 18901b9b1eb4..288318ad21dd 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -407,12 +407,6 @@ struct backlight_device *backlight_device_get_by_type(enum backlight_type type)
407} 407}
408EXPORT_SYMBOL(backlight_device_get_by_type); 408EXPORT_SYMBOL(backlight_device_get_by_type);
409 409
410bool backlight_device_registered(enum backlight_type type)
411{
412 return backlight_device_get_by_type(type) ? true : false;
413}
414EXPORT_SYMBOL(backlight_device_registered);
415
416/** 410/**
417 * backlight_device_unregister - unregisters a backlight device object. 411 * backlight_device_unregister - unregisters a backlight device object.
418 * @bd: the backlight device object to be unregistered and freed. 412 * @bd: the backlight device object to be unregistered and freed.
diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index f46b88fa4a09..5f2fd61ef4fb 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -141,7 +141,6 @@ extern void devm_backlight_device_unregister(struct device *dev,
141 struct backlight_device *bd); 141 struct backlight_device *bd);
142extern void backlight_force_update(struct backlight_device *bd, 142extern void backlight_force_update(struct backlight_device *bd,
143 enum backlight_update_reason reason); 143 enum backlight_update_reason reason);
144extern bool backlight_device_registered(enum backlight_type type);
145extern int backlight_register_notifier(struct notifier_block *nb); 144extern int backlight_register_notifier(struct notifier_block *nb);
146extern int backlight_unregister_notifier(struct notifier_block *nb); 145extern int backlight_unregister_notifier(struct notifier_block *nb);
147extern struct backlight_device *backlight_device_get_by_type(enum backlight_type type); 146extern struct backlight_device *backlight_device_get_by_type(enum backlight_type type);