]> err.no Git - linux-2.6/blobdiff - drivers/parisc/sba_iommu.c
[PATCH] parisc: fix module_param iommu permission
[linux-2.6] / drivers / parisc / sba_iommu.c
index 294c1117098d69d6a0a9c13e26cd9f4727fbf528..26fece45e737db81c9e91e16a41bec540ea1ad54 100644 (file)
@@ -109,7 +109,7 @@ static unsigned long piranha_bad_128k = 0;
 
 #ifdef SBA_AGP_SUPPORT
 static int sba_reserve_agpgart = 1;
-module_param(sba_reserve_agpgart, int, 1);
+module_param(sba_reserve_agpgart, int, 0444);
 MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART");
 #endif
 
@@ -846,7 +846,7 @@ static void *sba_alloc_consistent(struct device *hwdev, size_t size,
        if (!hwdev) {
                /* only support PCI */
                *dma_handle = 0;
-               return 0;
+               return NULL;
        }
 
         ret = (void *) __get_free_pages(gfp, get_order(size));
@@ -1320,12 +1320,12 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
        ** the GART code to handshake on.
        */
        klist_iter_init(&sba->dev.klist_children, &i);
-       while (dev = next_device(&i)) {
+       while ((dev = next_device(&i))) {
                struct parisc_device *lba = to_parisc_device(dev);
                if (IS_QUICKSILVER(lba))
                        agp_found = 1;
        }
-       klist_iter_exit(&sba->dev.klist_children, &i);
+       klist_iter_exit(&i);
 
        if (agp_found && sba_reserve_agpgart) {
                printk(KERN_INFO "%s: reserving %dMb of IOVA space for agpgart\n",