All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pavel Machek <pavel@suse.cz>
Cc: eric.piel@tremplin-utc.net, lm-sensors@lm-sensors.org,
	linux-kernel@vger.kernel.org, rpurdie@rpsys.net, trenn@suse.de,
	burman.yan@gmail.com
Subject: Re: [lm-sensors] Driver for HP harddisk protection LED
Date: Thu, 16 Oct 2008 22:55:14 +0000	[thread overview]
Message-ID: <20081016155514.eed60f09.akpm@linux-foundation.org> (raw)
In-Reply-To: <20081016091016.GA15439@atrey.karlin.mff.cuni.cz>

On Thu, 16 Oct 2008 11:10:16 +0200
Pavel Machek <pavel@suse.cz> wrote:

> HP notebooks contain accelerometer-based disk protection subsystem,
> and LED that indicates hard disk is protected. This is driver for the
> LED part.

- fix comment typo

- use standard suspend/resume ifdef avoidance trick


 drivers/leds/leds-hp-disk.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/leds/leds-hp-disk.c~leds-driver-for-hp-harddisk-protection-led-fix
+++ a/drivers/leds/leds-hp-disk.c
@@ -49,7 +49,7 @@ static struct acpi_hpled adev;
 
 static acpi_status hpled_acpi_write(acpi_handle handle, int reg)
 {
-	unsigned long ret; /* Not used when writting */
+	unsigned long ret; /* Not used when writing */
 	union acpi_object in_obj[1];
 	struct acpi_object_list args = { 1, in_obj };
 
@@ -83,6 +83,9 @@ static int hpled_resume(struct acpi_devi
 	led_classdev_resume(&hpled_led);
 	return 0;
 }
+#else
+#define hpled_suspend NULL
+#define hpled_resume NULL
 #endif
 
 static int hpled_add(struct acpi_device *device)
@@ -119,10 +122,8 @@ static struct acpi_driver leds_hp_driver
 	.ops = {
 		.add     = hpled_add,
 		.remove  = hpled_remove,
-#ifdef CONFIG_PM
 		.suspend = hpled_suspend,
 		.resume  = hpled_resume,
-#endif
 	}
 };
 
_


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Pavel Machek <pavel@suse.cz>
Cc: eric.piel@tremplin-utc.net, lm-sensors@lm-sensors.org,
	linux-kernel@vger.kernel.org, rpurdie@rpsys.net, trenn@suse.de,
	burman.yan@gmail.com
Subject: Re: Driver for HP harddisk protection LED
Date: Thu, 16 Oct 2008 15:55:14 -0700	[thread overview]
Message-ID: <20081016155514.eed60f09.akpm@linux-foundation.org> (raw)
In-Reply-To: <20081016091016.GA15439@atrey.karlin.mff.cuni.cz>

On Thu, 16 Oct 2008 11:10:16 +0200
Pavel Machek <pavel@suse.cz> wrote:

> HP notebooks contain accelerometer-based disk protection subsystem,
> and LED that indicates hard disk is protected. This is driver for the
> LED part.

- fix comment typo

- use standard suspend/resume ifdef avoidance trick


 drivers/leds/leds-hp-disk.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/leds/leds-hp-disk.c~leds-driver-for-hp-harddisk-protection-led-fix
+++ a/drivers/leds/leds-hp-disk.c
@@ -49,7 +49,7 @@ static struct acpi_hpled adev;
 
 static acpi_status hpled_acpi_write(acpi_handle handle, int reg)
 {
-	unsigned long ret; /* Not used when writting */
+	unsigned long ret; /* Not used when writing */
 	union acpi_object in_obj[1];
 	struct acpi_object_list args = { 1, in_obj };
 
@@ -83,6 +83,9 @@ static int hpled_resume(struct acpi_devi
 	led_classdev_resume(&hpled_led);
 	return 0;
 }
+#else
+#define hpled_suspend NULL
+#define hpled_resume NULL
 #endif
 
 static int hpled_add(struct acpi_device *device)
@@ -119,10 +122,8 @@ static struct acpi_driver leds_hp_driver
 	.ops = {
 		.add     = hpled_add,
 		.remove  = hpled_remove,
-#ifdef CONFIG_PM
 		.suspend = hpled_suspend,
 		.resume  = hpled_resume,
-#endif
 	}
 };
 
_


  reply	other threads:[~2008-10-16 22:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <48C984F5.5000804@tudelft.nl>
     [not found] ` <200809120736.06594.trenn@suse.de>
     [not found]   ` <48CAD89F.1050806@tremplin-utc.net>
2008-10-15  7:25     ` [lm-sensors] Accelerometer driver for HP laptops Pavel Machek
2008-10-15  7:25       ` Pavel Machek
2008-10-15  7:50       ` [lm-sensors] " Eric Piel
2008-10-15  7:50         ` Eric Piel
2008-10-15 10:58         ` [lm-sensors] " Pavel Machek
2008-10-15 10:58           ` Pavel Machek
2008-10-15 11:20           ` [lm-sensors] " Eric Piel
2008-10-15 11:20             ` Eric Piel
2008-10-15 12:03             ` [lm-sensors] " Pavel Machek
2008-10-15 12:03               ` Pavel Machek
2008-10-16  9:10       ` [lm-sensors] Driver for HP harddisk protection LED Pavel Machek
2008-10-16  9:10         ` Pavel Machek
2008-10-16 22:55         ` Andrew Morton [this message]
2008-10-16 22:55           ` Andrew Morton

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=20081016155514.eed60f09.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=burman.yan@gmail.com \
    --cc=eric.piel@tremplin-utc.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=pavel@suse.cz \
    --cc=rpurdie@rpsys.net \
    --cc=trenn@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.