linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: Jingoo Han <jg1.han@samsung.com>,
	Lee Jones <lee.jones@linaro.org>, Zhang Rui <rui.zhang@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: [PATCH 2/3] video / backlight: remove the backlight_device_registered API
Date: Wed, 31 Dec 2014 11:50:17 +0800	[thread overview]
Message-ID: <1419997818-19528-3-git-send-email-aaron.lu@intel.com> (raw)
In-Reply-To: <1419997818-19528-1-git-send-email-aaron.lu@intel.com>

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>
---
 drivers/acpi/video.c                | 2 +-
 drivers/video/backlight/backlight.c | 6 ------
 include/linux/backlight.h           | 1 -
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 1eaadff2e198..98d3f0de811e 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -246,7 +246,7 @@ static bool acpi_video_use_native_backlight(void)
 bool acpi_video_verify_backlight_support(void)
 {
 	if (acpi_osi_is_win8() && acpi_video_use_native_backlight() &&
-	    backlight_device_registered(BACKLIGHT_RAW))
+	    backlight_device_get_by_type(BACKLIGHT_RAW))
 		return false;
 	return acpi_video_backlight_support();
 }
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index bea749329236..aec173d9e1ee 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -406,12 +406,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.
diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index c59a020df3f8..287a4460054c 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -137,7 +137,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);
-- 
2.1.0


  parent reply	other threads:[~2014-12-31  3:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-31  3:50 [PATCH 0/3] Support INT3406 Display thermal device Aaron Lu
2014-12-31  3:50 ` [PATCH 1/3] video / backlight: add two APIs for drivers to use Aaron Lu
2015-01-03  1:04   ` Jingoo Han
2015-01-05  5:46     ` Aaron Lu
2015-01-05  6:01       ` Zhang Rui
2015-01-05  6:20         ` Jingoo Han
2015-01-05  6:51           ` Zhang Rui
2014-12-31  3:50 ` Aaron Lu [this message]
2015-01-03  1:05   ` [PATCH 2/3] video / backlight: remove the backlight_device_registered API Jingoo Han
2014-12-31  3:50 ` [PATCH 3/3] Thermal: introduce INT3406 thermal driver Aaron Lu
  -- strict thread matches above, loose matches on Subject: below --
2016-04-13  7:32 [PATCH v2 0/3] Support INT3406 Display thermal device Aaron Lu
2016-04-13  7:32 ` [PATCH 2/3] video / backlight: remove the backlight_device_registered API Aaron Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1419997818-19528-3-git-send-email-aaron.lu@intel.com \
    --to=aaron.lu@intel.com \
    --cc=jg1.han@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).