From ff40ad72addb448c1285181820597a17685ee69a Mon Sep 17 00:00:00 2001 From: Richard LIU Date: Thu, 29 Apr 2010 11:58:47 +0200 Subject: MIPS: Loongson: Fix find_vga_mem_init() This allows to use all display device for instance DISPLAY_OTHER like SM501. Signed-off-by: Arnaud Patard To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/1160/ Signed-off-by: Ralf Baechle --- arch/mips/loongson/common/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/mips/loongson/common/mem.c') diff --git a/arch/mips/loongson/common/mem.c b/arch/mips/loongson/common/mem.c index ec2f7964a0b..b5f402578a8 100644 --- a/arch/mips/loongson/common/mem.c +++ b/arch/mips/loongson/common/mem.c @@ -96,7 +96,7 @@ static int __init find_vga_mem_init(void) return 0; for_each_pci_dev(dev) { - if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) { + if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) { r = &dev->resource[idx]; if (!r->start && r->end) -- cgit v1.2.2 From 514b6d0c06a5d751259f145d9593b4d084c1cce3 Mon Sep 17 00:00:00 2001 From: Arnaud Patard Date: Thu, 29 Apr 2010 11:58:49 +0200 Subject: MIPS: Loongson: Fix phys_mem_access_prot() check The check used to determine if uncached accelerated should be used or not is wrong. The parenthesis are misplaced and making the test fail. Signed-off-by: Arnaud Patard To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/1161/ Signed-off-by: Ralf Baechle --- arch/mips/loongson/common/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/mips/loongson/common/mem.c') diff --git a/arch/mips/loongson/common/mem.c b/arch/mips/loongson/common/mem.c index b5f402578a8..30eba600120 100644 --- a/arch/mips/loongson/common/mem.c +++ b/arch/mips/loongson/common/mem.c @@ -75,7 +75,7 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, unsigned long end = offset + size; if (__uncached_access(file, offset)) { - if (((uca_start && offset) >= uca_start) && + if (uca_start && (offset >= uca_start) && (end <= uca_end)) return __pgprot((pgprot_val(vma_prot) & ~_CACHE_MASK) | -- cgit v1.2.2