From: Matthew Garrett <mjg@redhat.com>
To: rpurdie@rpsys.net
Cc: linux-kernel@vger.kernel.org, Matthew Garrett <mjg@redhat.com>
Subject: [PATCH 3/3] backlight: Remove old device_register and device_unregister API
Date: Tue, 15 Sep 2009 17:19:43 +0100 [thread overview]
Message-ID: <1253031583-11286-3-git-send-email-mjg@redhat.com> (raw)
In-Reply-To: <1253031583-11286-2-git-send-email-mjg@redhat.com>
Now all the users are transitioned, the old functions can be removed.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
drivers/video/backlight/backlight.c | 48 -----------------------------------
include/linux/backlight.h | 3 --
2 files changed, 0 insertions(+), 51 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 9048a28..39ffa86 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -289,38 +289,6 @@ int backlight_register(struct backlight_device *bd)
EXPORT_SYMBOL(backlight_register);
/**
- * backlight_device_register - create and register a new object of
- * backlight_device class.
- * @name: the name of the new object(must be the same as the name of the
- * respective framebuffer device).
- * @parent: a pointer to the parent device
- * @devdata: an optional pointer to be stored for private driver use. The
- * methods may retrieve it by using bl_get_data(bd).
- * @ops: the backlight operations structure.
- *
- * Creates and registers new backlight device. Returns either an
- * ERR_PTR() or a pointer to the newly allocated device.
- */
-struct backlight_device *backlight_device_register(const char *name,
- struct device *parent, void *devdata, struct backlight_ops *ops)
-{
- struct backlight_device *new_bd;
- int rc;
-
- new_bd = backlight_alloc(name, parent, devdata, ops);
-
- if (IS_ERR(new_bd))
- return new_bd;
-
- rc = backlight_register(new_bd);
- if (rc)
- return ERR_PTR(rc);
-
- return new_bd;
-}
-EXPORT_SYMBOL(backlight_device_register);
-
-/**
* backlight_destroy - frees a backlight device object
* @bd: the backlight device object to be freed.
*
@@ -359,22 +327,6 @@ void backlight_unregister(struct backlight_device *bd)
}
EXPORT_SYMBOL(backlight_unregister);
-/**
- * backlight_device_unregister - unregisters a backlight device object.
- * @bd: the backlight device object to be unregistered and freed.
- *
- * Unregisters a previously registered via backlight_device_register object.
- */
-void backlight_device_unregister(struct backlight_device *bd)
-{
- if (!bd)
- return;
-
- backlight_unregister(bd);
- backlight_destroy(bd);
-}
-EXPORT_SYMBOL(backlight_device_unregister);
-
static void __exit backlight_class_exit(void)
{
class_destroy(backlight_class);
diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index 9e17ff0..4c21b0b 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -98,13 +98,10 @@ static inline void backlight_update_status(struct backlight_device *bd)
}
-extern struct backlight_device *backlight_device_register(const char *name,
- struct device *dev, void *devdata, struct backlight_ops *ops);
extern struct backlight_device *backlight_alloc(const char *name,
struct device *dev, void *devdata, struct backlight_ops *ops);
extern int backlight_register(struct backlight_device *bd);
-extern void backlight_device_unregister(struct backlight_device *bd);
extern void backlight_unregister(struct backlight_device *bd);
extern void backlight_destroy(struct backlight_device *bd);
--
1.6.2.5
next prev parent reply other threads:[~2009-09-15 16:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-15 16:19 [PATCH 1/3] backlight: Provide two stage registration Matthew Garrett
2009-09-15 16:19 ` [PATCH 2/3] backlight: Transition drivers to new backlight API Matthew Garrett
2009-09-15 16:19 ` Matthew Garrett [this message]
2009-09-15 19:18 ` [PATCH 1/3] backlight: Provide two stage registration Richard Purdie
2009-09-15 19:27 ` Matthew Garrett
2009-09-15 19:42 ` Richard Purdie
2009-09-16 2:22 ` Henrique de Moraes Holschuh
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=1253031583-11286-3-git-send-email-mjg@redhat.com \
--to=mjg@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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
all inboxes | Powered by JetHome®