linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: i8042-io - Exclude mips platforms when allocating/deallocating IO regions.
@ 2014-01-25 19:01 Raghu Gandham
  2014-01-26 21:49 ` Dmitry Torokhov
  0 siblings, 1 reply; 8+ messages in thread
From: Raghu Gandham @ 2014-01-25 19:01 UTC (permalink / raw)
  To: dmitry.torokhov, aaro.koskinen, linux-input, linux-mips, linux-kernel
  Cc: Raghu Gandham

The standard IO regions are already reserved by the platform code on most MIPS
devices(malta, cobalt, sni). The Commit 197a1e96c8be5b6005145af3a4c0e45e2d651444
("Input: i8042-io - fix up region handling on MIPS") introduced a bug on these
MIPS platforms causing i8042 driver to fail when trying to reserve IO ports.
Prior to the above mentioned commit request_region is skipped on MIPS but
release_region is called.

This patch reverts commit 197a1e96c8be5b6005145af3a4c0e45e2d651444 and also
avoids calling release_region for MIPS.

Signed-off-by: Raghu Gandham <raghu.gandham@imgtec.com>
Reviewed-by: Steven J. Hill <Steven.Hill@imgtec.com>
---
 drivers/input/serio/i8042-io.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/serio/i8042-io.h b/drivers/input/serio/i8042-io.h
index a5eed2a..a09bb72 100644
--- a/drivers/input/serio/i8042-io.h
+++ b/drivers/input/serio/i8042-io.h
@@ -76,7 +76,7 @@ static inline int i8042_platform_init(void)
 	if (check_legacy_ioport(I8042_DATA_REG))
 		return -ENODEV;
 #endif
-#if !defined(__sh__) && !defined(__alpha__)
+#if !defined(__sh__) && !defined(__alpha__) && !defined(__mips__)
 	if (!request_region(I8042_DATA_REG, 16, "i8042"))
 		return -EBUSY;
 #endif
@@ -87,7 +87,7 @@ static inline int i8042_platform_init(void)
 
 static inline void i8042_platform_exit(void)
 {
-#if !defined(__sh__) && !defined(__alpha__)
+#if !defined(__sh__) && !defined(__alpha__) && !defined(__mips__)
 	release_region(I8042_DATA_REG, 16);
 #endif
 }
-- 
1.8.5.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-19 23:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-25 19:01 [PATCH] Input: i8042-io - Exclude mips platforms when allocating/deallocating IO regions Raghu Gandham
2014-01-26 21:49 ` Dmitry Torokhov
2014-01-27  0:32   ` Raghu Gandham
2014-01-27  6:56     ` Dmitry Torokhov
2014-01-27 20:24       ` Aaro Koskinen
2014-01-28  6:25         ` Raghu Gandham
2014-03-19 20:49           ` Ralf Baechle
2014-03-19 23:44             ` Aaro Koskinen

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