Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01c3664d authored by Aaron Lu's avatar Aaron Lu Committed by Rafael J. Wysocki
Browse files

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: default avatarAaron Lu <aaron.lu@intel.com>
Acked-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent f6a4790a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -358,7 +358,7 @@ enum acpi_backlight_type acpi_video_get_backlight_type(void)
	if (!(video_caps & ACPI_VIDEO_BACKLIGHT))
	if (!(video_caps & ACPI_VIDEO_BACKLIGHT))
		return acpi_backlight_vendor;
		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_native;


	return acpi_backlight_video;
	return acpi_backlight_video;
+0 −6
Original line number Original line Diff line number Diff line
@@ -407,12 +407,6 @@ struct backlight_device *backlight_device_get_by_type(enum backlight_type type)
}
}
EXPORT_SYMBOL(backlight_device_get_by_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.
 * backlight_device_unregister - unregisters a backlight device object.
 * @bd: the backlight device object to be unregistered and freed.
 * @bd: the backlight device object to be unregistered and freed.
+0 −1
Original line number Original line Diff line number Diff line
@@ -141,7 +141,6 @@ extern void devm_backlight_device_unregister(struct device *dev,
					struct backlight_device *bd);
					struct backlight_device *bd);
extern void backlight_force_update(struct backlight_device *bd,
extern void backlight_force_update(struct backlight_device *bd,
				   enum backlight_update_reason reason);
				   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_register_notifier(struct notifier_block *nb);
extern int backlight_unregister_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);
extern struct backlight_device *backlight_device_get_by_type(enum backlight_type type);