LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [2.6.22.y] {07/14} - sony-laptop: call sonypi_compat_init earlier - on top of 2.6.22.17
@ 2008-02-07 20:03 Oliver Pinter
  0 siblings, 0 replies; only message in thread
From: Oliver Pinter @ 2008-02-07 20:03 UTC (permalink / raw)
  To: Linux Kernel, stable, stable-commits

aka: sony-laptop-call-sonypi_compat_init-earlier.patch

From: Mattia Dongili <malattia@linux.it>
Date: Sun, 12 Aug 2007 07:20:27 +0000 (+0900)
Subject: sony-laptop: call sonypi_compat_init earlier
Patch-mainline: 2.6.23
References: 350984

sony-laptop: call sonypi_compat_init earlier

mainline: 015a916fbbf105bb15f4bbfd80c3b9b2f2e0d7db

sonypi_compat uses a kfifo that needs to be present before _SRS is
called to be able to cope with the IRQs triggered when setting
resources.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
Acked-by: Jeff Mahoney <jeffm@suse.com>
CC: Oliver Pinter <oliver.pntr@gmail.com>
---
 drivers/misc/sony-laptop.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

--- a/drivers/misc/sony-laptop.c	2007-11-28 10:52:13.000000000 -0500
+++ b/drivers/misc/sony-laptop.c	2008-01-02 15:17:42.000000000 -0500
@@ -2068,8 +2068,6 @@ static int sony_pic_remove(struct acpi_d
 	struct sony_pic_ioport *io, *tmp_io;
 	struct sony_pic_irq *irq, *tmp_irq;

-	sonypi_compat_exit();
-
 	if (sony_pic_disable(device)) {
 		printk(KERN_ERR DRV_PFX "Couldn't disable device.\n");
 		return -ENXIO;
@@ -2079,6 +2077,8 @@ static int sony_pic_remove(struct acpi_d
 	release_region(spic_dev.cur_ioport->io.minimum,
 			spic_dev.cur_ioport->io.address_length);

+	sonypi_compat_exit();
+
 	sony_laptop_remove_input();

 	/* pf attrs */
@@ -2144,6 +2144,9 @@ static int sony_pic_add(struct acpi_devi
 		goto err_free_resources;
 	}

+	if (sonypi_compat_init())
+		goto err_remove_input;
+
 	/* request io port */
 	list_for_each_entry(io, &spic_dev.ioports, list) {
 		if (request_region(io->io.minimum, io->io.address_length,
@@ -2158,7 +2161,7 @@ static int sony_pic_add(struct acpi_devi
 	if (!spic_dev.cur_ioport) {
 		printk(KERN_ERR DRV_PFX "Failed to request_region.\n");
 		result = -ENODEV;
-		goto err_remove_input;
+		goto err_remove_compat;
 	}

 	/* request IRQ */
@@ -2198,9 +2201,6 @@ static int sony_pic_add(struct acpi_devi
 	if (result)
 		goto err_remove_pf;

-	if (sonypi_compat_init())
-		goto err_remove_pf;
-
 	return 0;

 err_remove_pf:
@@ -2216,6 +2216,9 @@ err_release_region:
 	release_region(spic_dev.cur_ioport->io.minimum,
 			spic_dev.cur_ioport->io.address_length);

+err_remove_compat:
+	sonypi_compat_exit();
+
 err_remove_input:
 	sony_laptop_remove_input();



-- 
Thanks,
Oliver

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-07 20:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-07 20:03 [2.6.22.y] {07/14} - sony-laptop: call sonypi_compat_init earlier - on top of 2.6.22.17 Oliver Pinter

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).