The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Kim Kyuwon <q1.kim@samsung.com>
To: "'Axel Lin'" <axel.lin@gmail.com>, linux-kernel@vger.kernel.org
Cc: "'Richard Purdie'" <rpurdie@rpsys.net>,
	"'Andrew Morton'" <akpm@linux-foundation.org>
Subject: RE: [PATCH RESEND] leds: led-bd2802: bd2802_unregister_led_classdev should unregister all registered leds
Date: Wed, 24 Aug 2011 09:47:00 +0900	[thread overview]
Message-ID: <000701cc61f7$555fcd60$001f6820$%kim@samsung.com> (raw)
In-Reply-To: <1314142337.2198.1.camel@phoenix>

Acked-by: Kim Kyuwon <q1.kim@samsung.com>

-----Original Message-----
From: Axel Lin [mailto:axel.lin@gmail.com] 
Sent: Wednesday, August 24, 2011 8:32 AM
To: linux-kernel@vger.kernel.org
Cc: Kim Kyuwon; Richard Purdie; Andrew Morton
Subject: [PATCH RESEND] leds: led-bd2802: bd2802_unregister_led_classdev should unregister all registered leds

bd2802_unregister_led_classdev() should unregister all registered instances of
led_classdev class that had registered by bd2802_register_led_classdev().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/leds/leds-bd2802.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/leds/leds-bd2802.c b/drivers/leds/leds-bd2802.c
index 3ebe382..ea21855 100644
--- a/drivers/leds/leds-bd2802.c
+++ b/drivers/leds/leds-bd2802.c
@@ -662,6 +662,11 @@ failed_unregister_led1_R:
 static void bd2802_unregister_led_classdev(struct bd2802_led *led)
 {
 	cancel_work_sync(&led->work);
+	led_classdev_unregister(&led->cdev_led2b);
+	led_classdev_unregister(&led->cdev_led2g);
+	led_classdev_unregister(&led->cdev_led2r);
+	led_classdev_unregister(&led->cdev_led1b);
+	led_classdev_unregister(&led->cdev_led1g);
 	led_classdev_unregister(&led->cdev_led1r);
 }
 
-- 
1.7.4.1




      reply	other threads:[~2011-08-24  0:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23 23:32 [PATCH RESEND] leds: led-bd2802: bd2802_unregister_led_classdev should unregister all registered leds Axel Lin
2011-08-24  0:47 ` Kim Kyuwon [this message]

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='000701cc61f7$555fcd60$001f6820$%kim@samsung.com' \
    --to=q1.kim@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=axel.lin@gmail.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