Commit b52af409 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Ingo Molnar

i8327: fix outb() parameter order

In i8237A_resume(), when resetting the DMA controller, the parameters to
dma_outb() were mixed up.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
[ cleaned up the file a tiny bit. ]
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent d315760f
...@@ -28,10 +28,10 @@ static int i8237A_resume(struct sys_device *dev) ...@@ -28,10 +28,10 @@ static int i8237A_resume(struct sys_device *dev)
flags = claim_dma_lock(); flags = claim_dma_lock();
dma_outb(DMA1_RESET_REG, 0); dma_outb(0, DMA1_RESET_REG);
dma_outb(DMA2_RESET_REG, 0); dma_outb(0, DMA2_RESET_REG);
for (i = 0;i < 8;i++) { for (i = 0; i < 8; i++) {
set_dma_addr(i, 0x000000); set_dma_addr(i, 0x000000);
/* DMA count is a bit weird so this is not 0 */ /* DMA count is a bit weird so this is not 0 */
set_dma_count(i, 1); set_dma_count(i, 1);
...@@ -51,14 +51,14 @@ static int i8237A_suspend(struct sys_device *dev, pm_message_t state) ...@@ -51,14 +51,14 @@ static int i8237A_suspend(struct sys_device *dev, pm_message_t state)
} }
static struct sysdev_class i8237_sysdev_class = { static struct sysdev_class i8237_sysdev_class = {
.name = "i8237", .name = "i8237",
.suspend = i8237A_suspend, .suspend = i8237A_suspend,
.resume = i8237A_resume, .resume = i8237A_resume,
}; };
static struct sys_device device_i8237A = { static struct sys_device device_i8237A = {
.id = 0, .id = 0,
.cls = &i8237_sysdev_class, .cls = &i8237_sysdev_class,
}; };
static int __init i8237A_init_sysfs(void) static int __init i8237A_init_sysfs(void)
...@@ -68,5 +68,4 @@ static int __init i8237A_init_sysfs(void) ...@@ -68,5 +68,4 @@ static int __init i8237A_init_sysfs(void)
error = sysdev_register(&device_i8237A); error = sysdev_register(&device_i8237A);
return error; return error;
} }
device_initcall(i8237A_init_sysfs); device_initcall(i8237A_init_sysfs);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment