const: constify remaining file_operations
[safe/jmp/linux-2.6] / drivers / char / xilinx_hwicap / xilinx_hwicap.c
index 1e1b81e..4846d50 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2002 Xilinx Inc., Systems Engineering Group
  *     (c) Copyright 2004 Xilinx Inc., Systems Engineering Group
  *     (c) Copyright 2007-2008 Xilinx Inc.
@@ -74,7 +71,6 @@
  * currently programmed in the FPGA.
  */
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -87,7 +83,6 @@
 #include <linux/mutex.h>
 #include <linux/smp_lock.h>
 #include <linux/sysctl.h>
-#include <linux/version.h>
 #include <linux/fs.h>
 #include <linux/cdev.h>
 #include <linux/platform_device.h>
@@ -564,7 +559,7 @@ static int hwicap_release(struct inode *inode, struct file *file)
        return status;
 }
 
-static struct file_operations hwicap_fops = {
+static const struct file_operations hwicap_fops = {
        .owner = THIS_MODULE,
        .write = hwicap_write,
        .read = hwicap_read,
@@ -628,7 +623,7 @@ static int __devinit hwicap_setup(struct device *dev, int id,
        if (!request_mem_region(drvdata->mem_start,
                                        drvdata->mem_size, DRIVER_NAME)) {
                dev_err(dev, "Couldn't lock memory region at %Lx\n",
-                       regs_res->start);
+                       (unsigned long long) regs_res->start);
                retval = -EBUSY;
                goto failed1;
        }
@@ -647,9 +642,10 @@ static int __devinit hwicap_setup(struct device *dev, int id,
        mutex_init(&drvdata->sem);
        drvdata->is_open = 0;
 
-       dev_info(dev, "ioremap %lx to %p with size %Lx\n",
-                (unsigned long int)drvdata->mem_start,
-                       drvdata->base_address, drvdata->mem_size);
+       dev_info(dev, "ioremap %llx to %p with size %llx\n",
+                (unsigned long long) drvdata->mem_start,
+                drvdata->base_address,
+                (unsigned long long) drvdata->mem_size);
 
        cdev_init(&drvdata->cdev, &hwicap_fops);
        drvdata->cdev.owner = THIS_MODULE;
@@ -658,8 +654,8 @@ static int __devinit hwicap_setup(struct device *dev, int id,
                dev_err(dev, "cdev_add() failed\n");
                goto failed3;
        }
-       /*  devfs_mk_cdev(devt, S_IFCHR|S_IRUGO|S_IWUGO, DRIVER_NAME); */
-       device_create(icap_class, dev, devt, "%s%d", DRIVER_NAME, id);
+
+       device_create(icap_class, dev, devt, NULL, "%s%d", DRIVER_NAME, id);
        return 0;               /* success */
 
  failed3: