linux-mips
[Top] [All Lists]

[PATCH] mips: decrease size of au1xxx_dbdma_pm_regs[][]

To: rjw@sisk.pl, ralf@linux-mips.org, linux-pm@lists.linux-foundation.org, linux-mips@linux-mips.org, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] mips: decrease size of au1xxx_dbdma_pm_regs[][]
From: Roel Kluin <roel.kluin@gmail.com>
Date: Tue, 21 Jul 2009 14:46:51 +0200
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=nSvZqk1S5pJnoLRHZNJvDjf6UrcxZW86/wfOVXIBpl0=; b=XF6oUBSOuuJUxJ1IlGqRKXnhwMECut370T6hzkx+/VV7T9dwBMdQCccr5mhp7Delzg Z2ckrAUuErYcZjB5CG1YWUl9SIkjRXQCwsRkFtsl5WAWiRSmbdIVFJZ8B6MUZuXNrgB7 qgM4xdc7fCT24hhWD6k4h/PWYkxWgwTC/WgMk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=J0Pu/skla1iASUZFp7upxJv+sOp1xXIel6bAAb5VAyTlYhKuebo/Di2qnVRVgjXSVw f+y8/OEnk0tkanqEhvQ/UJhA/cXS0iYKZTMsshcFmQCVmVGjY0e9G7rFPCBP9FBAuQLw ldvYhKTxvPfD86uf7djtKA0SBde6keWx0swDA=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2
Only registers [0-DDMA_CHANNEL_BASE][0-6] are used by the suspend
and resume routines.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
These routines are on the bottom of the file. Only used are
registers:

au1xxx_dbdma_pm_regs[0][0-3]

and 

au1xxx_dbdma_pm_regs[1-NUM_DBDMA_CHANS][0-6]

Is my patch right, that assumes that the array can be smaller, or
should the storage and recovery of other registers be added?

Roel

diff --git a/arch/mips/alchemy/common/dbdma.c b/arch/mips/alchemy/common/dbdma.c
index 3ab6d80..bf48a21 100644
--- a/arch/mips/alchemy/common/dbdma.c
+++ b/arch/mips/alchemy/common/dbdma.c
@@ -175,7 +175,7 @@ static dbdev_tab_t dbdev_tab[] = {
 #define DBDEV_TAB_SIZE ARRAY_SIZE(dbdev_tab)
 
 #ifdef CONFIG_PM
-static u32 au1xxx_dbdma_pm_regs[NUM_DBDMA_CHANS + 1][8];
+static u32 au1xxx_dbdma_pm_regs[NUM_DBDMA_CHANS][7];
 #endif
 
 

<Prev in Thread] Current Thread [Next in Thread>