]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/rtas_flash.c
[POWERPC] irqtrace support for 64-bit powerpc
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / rtas_flash.c
index f72118c0844fa9da217893869db5ec657cc5a200..627f126d1848b4ec1f5e0eb2e2d8c5870bda93c5 100644 (file)
@@ -286,7 +286,7 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf,
 }
 
 /* constructor for flash_block_cache */
-void rtas_block_ctor(void *ptr, struct kmem_cache *cache, unsigned long flags)
+void rtas_block_ctor(struct kmem_cache *cache, void *ptr)
 {
        memset(ptr, 0, RTAS_BLK_SIZE);
 }
@@ -356,7 +356,7 @@ static int rtas_excl_open(struct inode *inode, struct file *file)
 
        /* Enforce exclusive open with use count of PDE */
        spin_lock(&flash_file_open_lock);
-       if (atomic_read(&dp->count) > 1) {
+       if (atomic_read(&dp->count) > 2) {
                spin_unlock(&flash_file_open_lock);
                return -EBUSY;
        }
@@ -804,10 +804,10 @@ int __init rtas_flash_init(void)
 
        flash_block_cache = kmem_cache_create("rtas_flash_cache",
                                RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
-                               rtas_block_ctor, NULL);
+                               rtas_block_ctor);
        if (!flash_block_cache) {
                printk(KERN_ERR "%s: failed to create block cache\n",
-                               __FUNCTION__);
+                               __func__);
                rc = -ENOMEM;
                goto cleanup;
        }