[PATCH] make more file_operation structs static
Mark the static struct file_operations in drivers/char as const. Making them const prevents accidental bugs, and moves them to the .rodata section so that they no longer do any false sharing; in addition with the proper debug option they are then protected against corruption.. [akpm@osdl.org: build fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
d459ec0baa
commit
62322d2554
97 changed files with 118 additions and 118 deletions
|
@ -1059,7 +1059,7 @@ static int agp_ioctl(struct inode *inode, struct file *file,
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations agp_fops =
|
static const struct file_operations agp_fops =
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
|
|
|
@ -112,7 +112,7 @@ static int ac_ioctl(struct inode *, struct file *, unsigned int,
|
||||||
unsigned long);
|
unsigned long);
|
||||||
static irqreturn_t ac_interrupt(int, void *, struct pt_regs *);
|
static irqreturn_t ac_interrupt(int, void *, struct pt_regs *);
|
||||||
|
|
||||||
static struct file_operations ac_fops = {
|
static const struct file_operations ac_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = ac_read,
|
.read = ac_read,
|
||||||
|
|
|
@ -158,7 +158,7 @@ static int cs5535_gpio_open(struct inode *inode, struct file *file)
|
||||||
return nonseekable_open(inode, file);
|
return nonseekable_open(inode, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations cs5535_gpio_fops = {
|
static const struct file_operations cs5535_gpio_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.write = cs5535_gpio_write,
|
.write = cs5535_gpio_write,
|
||||||
.read = cs5535_gpio_read,
|
.read = cs5535_gpio_read,
|
||||||
|
|
|
@ -281,7 +281,7 @@ static unsigned int ds1286_poll(struct file *file, poll_table *wait)
|
||||||
* The various file operations we support.
|
* The various file operations we support.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations ds1286_fops = {
|
static const struct file_operations ds1286_fops = {
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = ds1286_read,
|
.read = ds1286_read,
|
||||||
.poll = ds1286_poll,
|
.poll = ds1286_poll,
|
||||||
|
|
|
@ -282,7 +282,7 @@ get_rtc_status(char *buf)
|
||||||
|
|
||||||
/* The various file operations we support. */
|
/* The various file operations we support. */
|
||||||
|
|
||||||
static struct file_operations rtc_fops = {
|
static const struct file_operations rtc_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = rtc_ioctl,
|
.ioctl = rtc_ioctl,
|
||||||
};
|
};
|
||||||
|
|
|
@ -336,7 +336,7 @@ proc_therm_ds1620_read(char *buf, char **start, off_t offset,
|
||||||
static struct proc_dir_entry *proc_therm_ds1620;
|
static struct proc_dir_entry *proc_therm_ds1620;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct file_operations ds1620_fops = {
|
static const struct file_operations ds1620_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = nonseekable_open,
|
.open = nonseekable_open,
|
||||||
.read = ds1620_read,
|
.read = ds1620_read,
|
||||||
|
|
|
@ -483,7 +483,7 @@ static int dsp56k_release(struct inode *inode, struct file *file)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations dsp56k_fops = {
|
static const struct file_operations dsp56k_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = dsp56k_read,
|
.read = dsp56k_read,
|
||||||
.write = dsp56k_write,
|
.write = dsp56k_write,
|
||||||
|
|
|
@ -94,7 +94,7 @@ static int dtlk_release(struct inode *, struct file *);
|
||||||
static int dtlk_ioctl(struct inode *inode, struct file *file,
|
static int dtlk_ioctl(struct inode *inode, struct file *file,
|
||||||
unsigned int cmd, unsigned long arg);
|
unsigned int cmd, unsigned long arg);
|
||||||
|
|
||||||
static struct file_operations dtlk_fops =
|
static const struct file_operations dtlk_fops =
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = dtlk_read,
|
.read = dtlk_read,
|
||||||
|
|
|
@ -285,7 +285,7 @@ efi_rtc_close(struct inode *inode, struct file *file)
|
||||||
* The various file operations we support.
|
* The various file operations we support.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations efi_rtc_fops = {
|
static const struct file_operations efi_rtc_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = efi_rtc_ioctl,
|
.ioctl = efi_rtc_ioctl,
|
||||||
.open = efi_rtc_open,
|
.open = efi_rtc_open,
|
||||||
|
|
|
@ -86,7 +86,7 @@ static ssize_t zft_read (struct file *fp, char __user *buff,
|
||||||
static ssize_t zft_write(struct file *fp, const char __user *buff,
|
static ssize_t zft_write(struct file *fp, const char __user *buff,
|
||||||
size_t req_len, loff_t *ppos);
|
size_t req_len, loff_t *ppos);
|
||||||
|
|
||||||
static struct file_operations zft_cdev =
|
static const struct file_operations zft_cdev =
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = zft_read,
|
.read = zft_read,
|
||||||
|
|
|
@ -482,7 +482,7 @@ static inline int gen_rtc_proc_init(void) { return 0; }
|
||||||
* The various file operations we support.
|
* The various file operations we support.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations gen_rtc_fops = {
|
static const struct file_operations gen_rtc_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
#ifdef CONFIG_GEN_RTC_X
|
#ifdef CONFIG_GEN_RTC_X
|
||||||
.read = gen_rtc_read,
|
.read = gen_rtc_read,
|
||||||
|
|
|
@ -553,7 +553,7 @@ hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, int kernel)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations hpet_fops = {
|
static const struct file_operations hpet_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = hpet_read,
|
.read = hpet_read,
|
||||||
|
|
|
@ -149,7 +149,7 @@ static ssize_t rng_dev_read(struct file *filp, char __user *buf,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations rng_chrdev_ops = {
|
static const struct file_operations rng_chrdev_ops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = rng_dev_open,
|
.open = rng_dev_open,
|
||||||
.read = rng_dev_read,
|
.read = rng_dev_read,
|
||||||
|
|
|
@ -80,7 +80,7 @@ static int i8k_open_fs(struct inode *inode, struct file *file);
|
||||||
static int i8k_ioctl(struct inode *, struct file *, unsigned int,
|
static int i8k_ioctl(struct inode *, struct file *, unsigned int,
|
||||||
unsigned long);
|
unsigned long);
|
||||||
|
|
||||||
static struct file_operations i8k_fops = {
|
static const struct file_operations i8k_fops = {
|
||||||
.open = i8k_open_fs,
|
.open = i8k_open_fs,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
.llseek = seq_lseek,
|
.llseek = seq_lseek,
|
||||||
|
|
|
@ -233,7 +233,7 @@ static void *DevTableMem[IP2_MAX_BOARDS];
|
||||||
/* This is the driver descriptor for the ip2ipl device, which is used to
|
/* This is the driver descriptor for the ip2ipl device, which is used to
|
||||||
* download the loadware to the boards.
|
* download the loadware to the boards.
|
||||||
*/
|
*/
|
||||||
static struct file_operations ip2_ipl = {
|
static const struct file_operations ip2_ipl = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = ip2_ipl_read,
|
.read = ip2_ipl_read,
|
||||||
.write = ip2_ipl_write,
|
.write = ip2_ipl_write,
|
||||||
|
|
|
@ -196,7 +196,7 @@ static int rtc_release(struct inode *inode, struct file *file)
|
||||||
* The various file operations we support.
|
* The various file operations we support.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations rtc_fops = {
|
static const struct file_operations rtc_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = rtc_ioctl,
|
.ioctl = rtc_ioctl,
|
||||||
.open = rtc_open,
|
.open = rtc_open,
|
||||||
|
|
|
@ -765,7 +765,7 @@ static long compat_ipmi_ioctl(struct file *filep, unsigned int cmd,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct file_operations ipmi_fops = {
|
static const struct file_operations ipmi_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = ipmi_ioctl,
|
.ioctl = ipmi_ioctl,
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
|
|
|
@ -807,7 +807,7 @@ static int ipmi_close(struct inode *ino, struct file *filep)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations ipmi_wdog_fops = {
|
static const struct file_operations ipmi_wdog_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = ipmi_read,
|
.read = ipmi_read,
|
||||||
.poll = ipmi_poll,
|
.poll = ipmi_poll,
|
||||||
|
|
|
@ -748,7 +748,7 @@ static int stli_initpcibrd(int brdtype, struct pci_dev *devp);
|
||||||
* will give access to the shared memory on the Stallion intelligent
|
* will give access to the shared memory on the Stallion intelligent
|
||||||
* board. This is also a very useful debugging tool.
|
* board. This is also a very useful debugging tool.
|
||||||
*/
|
*/
|
||||||
static struct file_operations stli_fsiomem = {
|
static const struct file_operations stli_fsiomem = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = stli_memread,
|
.read = stli_memread,
|
||||||
.write = stli_memwrite,
|
.write = stli_memwrite,
|
||||||
|
|
|
@ -357,7 +357,7 @@ DEB(printk("interrupt 0x%x %d\n",ITE_GPAISR, i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations ite_gpio_fops = {
|
static const struct file_operations ite_gpio_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = ite_gpio_ioctl,
|
.ioctl = ite_gpio_ioctl,
|
||||||
.open = ite_gpio_open,
|
.open = ite_gpio_open,
|
||||||
|
|
|
@ -598,7 +598,7 @@ static ssize_t lcd_read(struct file *file, char *buf,
|
||||||
* The various file operations we support.
|
* The various file operations we support.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations lcd_fops = {
|
static const struct file_operations lcd_fops = {
|
||||||
.read = lcd_read,
|
.read = lcd_read,
|
||||||
.ioctl = lcd_ioctl,
|
.ioctl = lcd_ioctl,
|
||||||
.open = lcd_open,
|
.open = lcd_open,
|
||||||
|
|
|
@ -666,7 +666,7 @@ static int lp_ioctl(struct inode *inode, struct file *file,
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations lp_fops = {
|
static const struct file_operations lp_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.write = lp_write,
|
.write = lp_write,
|
||||||
.ioctl = lp_ioctl,
|
.ioctl = lp_ioctl,
|
||||||
|
|
|
@ -776,7 +776,7 @@ static int open_port(struct inode * inode, struct file * filp)
|
||||||
#define open_kmem open_mem
|
#define open_kmem open_mem
|
||||||
#define open_oldmem open_mem
|
#define open_oldmem open_mem
|
||||||
|
|
||||||
static struct file_operations mem_fops = {
|
static const struct file_operations mem_fops = {
|
||||||
.llseek = memory_lseek,
|
.llseek = memory_lseek,
|
||||||
.read = read_mem,
|
.read = read_mem,
|
||||||
.write = write_mem,
|
.write = write_mem,
|
||||||
|
@ -784,7 +784,7 @@ static struct file_operations mem_fops = {
|
||||||
.open = open_mem,
|
.open = open_mem,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations kmem_fops = {
|
static const struct file_operations kmem_fops = {
|
||||||
.llseek = memory_lseek,
|
.llseek = memory_lseek,
|
||||||
.read = read_kmem,
|
.read = read_kmem,
|
||||||
.write = write_kmem,
|
.write = write_kmem,
|
||||||
|
@ -792,7 +792,7 @@ static struct file_operations kmem_fops = {
|
||||||
.open = open_kmem,
|
.open = open_kmem,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations null_fops = {
|
static const struct file_operations null_fops = {
|
||||||
.llseek = null_lseek,
|
.llseek = null_lseek,
|
||||||
.read = read_null,
|
.read = read_null,
|
||||||
.write = write_null,
|
.write = write_null,
|
||||||
|
@ -800,7 +800,7 @@ static struct file_operations null_fops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(CONFIG_ISA) || !defined(__mc68000__)
|
#if defined(CONFIG_ISA) || !defined(__mc68000__)
|
||||||
static struct file_operations port_fops = {
|
static const struct file_operations port_fops = {
|
||||||
.llseek = memory_lseek,
|
.llseek = memory_lseek,
|
||||||
.read = read_port,
|
.read = read_port,
|
||||||
.write = write_port,
|
.write = write_port,
|
||||||
|
@ -808,7 +808,7 @@ static struct file_operations port_fops = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct file_operations zero_fops = {
|
static const struct file_operations zero_fops = {
|
||||||
.llseek = zero_lseek,
|
.llseek = zero_lseek,
|
||||||
.read = read_zero,
|
.read = read_zero,
|
||||||
.write = write_zero,
|
.write = write_zero,
|
||||||
|
@ -819,14 +819,14 @@ static struct backing_dev_info zero_bdi = {
|
||||||
.capabilities = BDI_CAP_MAP_COPY,
|
.capabilities = BDI_CAP_MAP_COPY,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations full_fops = {
|
static const struct file_operations full_fops = {
|
||||||
.llseek = full_lseek,
|
.llseek = full_lseek,
|
||||||
.read = read_full,
|
.read = read_full,
|
||||||
.write = write_full,
|
.write = write_full,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_CRASH_DUMP
|
#ifdef CONFIG_CRASH_DUMP
|
||||||
static struct file_operations oldmem_fops = {
|
static const struct file_operations oldmem_fops = {
|
||||||
.read = read_oldmem,
|
.read = read_oldmem,
|
||||||
.open = open_oldmem,
|
.open = open_oldmem,
|
||||||
};
|
};
|
||||||
|
@ -853,7 +853,7 @@ static ssize_t kmsg_write(struct file * file, const char __user * buf,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations kmsg_fops = {
|
static const struct file_operations kmsg_fops = {
|
||||||
.write = kmsg_write,
|
.write = kmsg_write,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -903,7 +903,7 @@ static int memory_open(struct inode * inode, struct file * filp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations memory_fops = {
|
static const struct file_operations memory_fops = {
|
||||||
.open = memory_open, /* just a selector for the real open */
|
.open = memory_open, /* just a selector for the real open */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ static int misc_seq_open(struct inode *inode, struct file *file)
|
||||||
return seq_open(file, &misc_seq_ops);
|
return seq_open(file, &misc_seq_ops);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations misc_proc_fops = {
|
static const struct file_operations misc_proc_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = misc_seq_open,
|
.open = misc_seq_open,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
|
@ -176,7 +176,7 @@ static int misc_open(struct inode * inode, struct file * file)
|
||||||
*/
|
*/
|
||||||
static struct class *misc_class;
|
static struct class *misc_class;
|
||||||
|
|
||||||
static struct file_operations misc_fops = {
|
static const struct file_operations misc_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = misc_open,
|
.open = misc_open,
|
||||||
};
|
};
|
||||||
|
|
|
@ -63,7 +63,7 @@ static int mmtimer_mmap(struct file *file, struct vm_area_struct *vma);
|
||||||
*/
|
*/
|
||||||
static unsigned long mmtimer_femtoperiod = 0;
|
static unsigned long mmtimer_femtoperiod = 0;
|
||||||
|
|
||||||
static struct file_operations mmtimer_fops = {
|
static const struct file_operations mmtimer_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.mmap = mmtimer_mmap,
|
.mmap = mmtimer_mmap,
|
||||||
.ioctl = mmtimer_ioctl,
|
.ioctl = mmtimer_ioctl,
|
||||||
|
|
|
@ -454,7 +454,7 @@ static int register_serial_portandirq(unsigned int port, int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations mwave_fops = {
|
static const struct file_operations mwave_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = mwave_read,
|
.read = mwave_read,
|
||||||
.write = mwave_write,
|
.write = mwave_write,
|
||||||
|
|
|
@ -437,7 +437,7 @@ nvram_read_proc(char *buffer, char **start, off_t offset,
|
||||||
|
|
||||||
#endif /* CONFIG_PROC_FS */
|
#endif /* CONFIG_PROC_FS */
|
||||||
|
|
||||||
static struct file_operations nvram_fops = {
|
static const struct file_operations nvram_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = nvram_llseek,
|
.llseek = nvram_llseek,
|
||||||
.read = nvram_read,
|
.read = nvram_read,
|
||||||
|
|
|
@ -183,7 +183,7 @@ static int button_read (struct file *filp, char __user *buffer,
|
||||||
* attempts to perform these operations on the device.
|
* attempts to perform these operations on the device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations button_fops = {
|
static const struct file_operations button_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = button_read,
|
.read = button_read,
|
||||||
};
|
};
|
||||||
|
|
|
@ -642,7 +642,7 @@ static void kick_open(void)
|
||||||
udelay(25);
|
udelay(25);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations flash_fops =
|
static const struct file_operations flash_fops =
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = flash_llseek,
|
.llseek = flash_llseek,
|
||||||
|
|
|
@ -236,7 +236,7 @@ static int pc8736x_gpio_open(struct inode *inode, struct file *file)
|
||||||
return nonseekable_open(inode, file);
|
return nonseekable_open(inode, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations pc8736x_gpio_fops = {
|
static const struct file_operations pc8736x_gpio_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = pc8736x_gpio_open,
|
.open = pc8736x_gpio_open,
|
||||||
.write = nsc_gpio_write,
|
.write = nsc_gpio_write,
|
||||||
|
|
|
@ -1938,7 +1938,7 @@ static void cm4000_detach(struct pcmcia_device *link)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations cm4000_fops = {
|
static const struct file_operations cm4000_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = cmm_read,
|
.read = cmm_read,
|
||||||
.write = cmm_write,
|
.write = cmm_write,
|
||||||
|
|
|
@ -688,7 +688,7 @@ static void reader_detach(struct pcmcia_device *link)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations reader_fops = {
|
static const struct file_operations reader_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = cm4040_read,
|
.read = cm4040_read,
|
||||||
.write = cm4040_write,
|
.write = cm4040_write,
|
||||||
|
|
|
@ -739,7 +739,7 @@ static unsigned int pp_poll (struct file * file, poll_table * wait)
|
||||||
|
|
||||||
static struct class *ppdev_class;
|
static struct class *ppdev_class;
|
||||||
|
|
||||||
static struct file_operations pp_fops = {
|
static const struct file_operations pp_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = pp_read,
|
.read = pp_read,
|
||||||
|
|
|
@ -30,7 +30,7 @@ struct raw_device_data {
|
||||||
static struct class *raw_class;
|
static struct class *raw_class;
|
||||||
static struct raw_device_data raw_devices[MAX_RAW_MINORS];
|
static struct raw_device_data raw_devices[MAX_RAW_MINORS];
|
||||||
static DEFINE_MUTEX(raw_mutex);
|
static DEFINE_MUTEX(raw_mutex);
|
||||||
static struct file_operations raw_ctl_fops; /* forward declaration */
|
static const struct file_operations raw_ctl_fops; /* forward declaration */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Open/close code for raw IO.
|
* Open/close code for raw IO.
|
||||||
|
@ -261,7 +261,7 @@ static ssize_t raw_file_aio_write(struct kiocb *iocb, const char __user *buf,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations raw_fops = {
|
static const struct file_operations raw_fops = {
|
||||||
.read = generic_file_read,
|
.read = generic_file_read,
|
||||||
.aio_read = generic_file_aio_read,
|
.aio_read = generic_file_aio_read,
|
||||||
.write = raw_file_write,
|
.write = raw_file_write,
|
||||||
|
@ -274,7 +274,7 @@ static struct file_operations raw_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations raw_ctl_fops = {
|
static const struct file_operations raw_ctl_fops = {
|
||||||
.ioctl = raw_ctl_ioctl,
|
.ioctl = raw_ctl_ioctl,
|
||||||
.open = raw_open,
|
.open = raw_open,
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
|
|
|
@ -243,7 +243,7 @@ static struct real_driver rio_real_driver = {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations rio_fw_fops = {
|
static const struct file_operations rio_fw_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = rio_fw_ioctl,
|
.ioctl = rio_fw_ioctl,
|
||||||
};
|
};
|
||||||
|
|
|
@ -877,7 +877,7 @@ int rtc_control(rtc_task_t *task, unsigned int cmd, unsigned long arg)
|
||||||
* The various file operations we support.
|
* The various file operations we support.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations rtc_fops = {
|
static const struct file_operations rtc_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = rtc_read,
|
.read = rtc_read,
|
||||||
|
@ -896,7 +896,7 @@ static struct miscdevice rtc_dev = {
|
||||||
.fops = &rtc_fops,
|
.fops = &rtc_fops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations rtc_proc_fops = {
|
static const struct file_operations rtc_proc_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = rtc_proc_open,
|
.open = rtc_proc_open,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
|
|
|
@ -63,7 +63,7 @@ static int scx200_gpio_release(struct inode *inode, struct file *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations scx200_gpio_fops = {
|
static const struct file_operations scx200_gpio_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.write = nsc_gpio_write,
|
.write = nsc_gpio_write,
|
||||||
.read = nsc_gpio_read,
|
.read = nsc_gpio_read,
|
||||||
|
|
|
@ -347,7 +347,7 @@ scdrv_poll(struct file *file, struct poll_table_struct *wait)
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations scdrv_fops = {
|
static const struct file_operations scdrv_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = scdrv_read,
|
.read = scdrv_read,
|
||||||
.write = scdrv_write,
|
.write = scdrv_write,
|
||||||
|
|
|
@ -1106,7 +1106,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations sonypi_misc_fops = {
|
static const struct file_operations sonypi_misc_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = sonypi_misc_read,
|
.read = sonypi_misc_read,
|
||||||
.poll = sonypi_misc_poll,
|
.poll = sonypi_misc_poll,
|
||||||
|
|
|
@ -707,7 +707,7 @@ static unsigned int sc26198_baudtable[] = {
|
||||||
* Define the driver info for a user level control device. Used mainly
|
* Define the driver info for a user level control device. Used mainly
|
||||||
* to get at port stats - only not using the port device itself.
|
* to get at port stats - only not using the port device itself.
|
||||||
*/
|
*/
|
||||||
static struct file_operations stl_fsiomem = {
|
static const struct file_operations stl_fsiomem = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = stl_memioctl,
|
.ioctl = stl_memioctl,
|
||||||
};
|
};
|
||||||
|
|
|
@ -410,7 +410,7 @@ static struct real_driver sx_real_driver = {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations sx_fw_fops = {
|
static const struct file_operations sx_fw_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = sx_fw_ioctl,
|
.ioctl = sx_fw_ioctl,
|
||||||
};
|
};
|
||||||
|
|
|
@ -255,7 +255,7 @@ static int tanbac_tb0219_release(struct inode *inode, struct file *file)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations tb0219_fops = {
|
static const struct file_operations tb0219_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = tanbac_tb0219_read,
|
.read = tanbac_tb0219_read,
|
||||||
.write = tanbac_tb0219_write,
|
.write = tanbac_tb0219_write,
|
||||||
|
|
|
@ -381,7 +381,7 @@ tipar_ioctl(struct inode *inode, struct file *file,
|
||||||
|
|
||||||
/* ----- kernel module registering ------------------------------------ */
|
/* ----- kernel module registering ------------------------------------ */
|
||||||
|
|
||||||
static struct file_operations tipar_fops = {
|
static const struct file_operations tipar_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = tipar_read,
|
.read = tipar_read,
|
||||||
|
|
|
@ -247,7 +247,7 @@ static ssize_t tlclk_write(struct file *filp, const char __user *buf, size_t cou
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations tlclk_fops = {
|
static const struct file_operations tlclk_fops = {
|
||||||
.read = tlclk_read,
|
.read = tlclk_read,
|
||||||
.write = tlclk_write,
|
.write = tlclk_write,
|
||||||
.open = tlclk_open,
|
.open = tlclk_open,
|
||||||
|
|
|
@ -92,7 +92,7 @@ static int tosh_ioctl(struct inode *, struct file *, unsigned int,
|
||||||
unsigned long);
|
unsigned long);
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations tosh_fops = {
|
static const struct file_operations tosh_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = tosh_ioctl,
|
.ioctl = tosh_ioctl,
|
||||||
};
|
};
|
||||||
|
|
|
@ -116,7 +116,7 @@ static u8 tpm_atml_status(struct tpm_chip *chip)
|
||||||
return ioread8(chip->vendor.iobase + 1);
|
return ioread8(chip->vendor.iobase + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations atmel_ops = {
|
static const struct file_operations atmel_ops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.open = tpm_open,
|
.open = tpm_open,
|
||||||
|
|
|
@ -338,7 +338,7 @@ static struct attribute *inf_attrs[] = {
|
||||||
|
|
||||||
static struct attribute_group inf_attr_grp = {.attrs = inf_attrs };
|
static struct attribute_group inf_attr_grp = {.attrs = inf_attrs };
|
||||||
|
|
||||||
static struct file_operations inf_ops = {
|
static const struct file_operations inf_ops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.open = tpm_open,
|
.open = tpm_open,
|
||||||
|
|
|
@ -226,7 +226,7 @@ static u8 tpm_nsc_status(struct tpm_chip *chip)
|
||||||
return inb(chip->vendor.base + NSC_STATUS);
|
return inb(chip->vendor.base + NSC_STATUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations nsc_ops = {
|
static const struct file_operations nsc_ops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.open = tpm_open,
|
.open = tpm_open,
|
||||||
|
|
|
@ -330,7 +330,7 @@ static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations tis_ops = {
|
static const struct file_operations tis_ops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.open = tpm_open,
|
.open = tpm_open,
|
||||||
|
|
|
@ -912,7 +912,7 @@ static int hung_up_tty_ioctl(struct inode * inode, struct file * file,
|
||||||
return cmd == TIOCSPGRP ? -ENOTTY : -EIO;
|
return cmd == TIOCSPGRP ? -ENOTTY : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations tty_fops = {
|
static const struct file_operations tty_fops = {
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = tty_read,
|
.read = tty_read,
|
||||||
.write = tty_write,
|
.write = tty_write,
|
||||||
|
@ -924,7 +924,7 @@ static struct file_operations tty_fops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_UNIX98_PTYS
|
#ifdef CONFIG_UNIX98_PTYS
|
||||||
static struct file_operations ptmx_fops = {
|
static const struct file_operations ptmx_fops = {
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = tty_read,
|
.read = tty_read,
|
||||||
.write = tty_write,
|
.write = tty_write,
|
||||||
|
@ -936,7 +936,7 @@ static struct file_operations ptmx_fops = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct file_operations console_fops = {
|
static const struct file_operations console_fops = {
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = tty_read,
|
.read = tty_read,
|
||||||
.write = redirected_tty_write,
|
.write = redirected_tty_write,
|
||||||
|
@ -947,7 +947,7 @@ static struct file_operations console_fops = {
|
||||||
.fasync = tty_fasync,
|
.fasync = tty_fasync,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations hung_up_tty_fops = {
|
static const struct file_operations hung_up_tty_fops = {
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = hung_up_tty_read,
|
.read = hung_up_tty_read,
|
||||||
.write = hung_up_tty_write,
|
.write = hung_up_tty_write,
|
||||||
|
|
|
@ -465,7 +465,7 @@ vcs_open(struct inode *inode, struct file *filp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations vcs_fops = {
|
static const struct file_operations vcs_fops = {
|
||||||
.llseek = vcs_lseek,
|
.llseek = vcs_lseek,
|
||||||
.read = vcs_read,
|
.read = vcs_read,
|
||||||
.write = vcs_write,
|
.write = vcs_write,
|
||||||
|
|
|
@ -292,7 +292,7 @@ static int proc_viotape_open(struct inode *inode, struct file *file)
|
||||||
return single_open(file, proc_viotape_show, NULL);
|
return single_open(file, proc_viotape_show, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations proc_viotape_operations = {
|
static const struct file_operations proc_viotape_operations = {
|
||||||
.open = proc_viotape_open,
|
.open = proc_viotape_open,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
.llseek = seq_lseek,
|
.llseek = seq_lseek,
|
||||||
|
|
|
@ -605,7 +605,7 @@ static int gpio_release(struct inode *inode, struct file *file)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations gpio_fops = {
|
static const struct file_operations gpio_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = gpio_read,
|
.read = gpio_read,
|
||||||
.write = gpio_write,
|
.write = gpio_write,
|
||||||
|
|
|
@ -231,7 +231,7 @@ static int acq_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations acq_fops = {
|
static const struct file_operations acq_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = acq_write,
|
.write = acq_write,
|
||||||
|
|
|
@ -227,7 +227,7 @@ advwdt_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations advwdt_fops = {
|
static const struct file_operations advwdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = advwdt_write,
|
.write = advwdt_write,
|
||||||
|
|
|
@ -362,7 +362,7 @@ static int __init ali_find_watchdog(void)
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations ali_fops = {
|
static const struct file_operations ali_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = ali_write,
|
.write = ali_write,
|
||||||
|
|
|
@ -281,7 +281,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations wdt_fops = {
|
static const struct file_operations wdt_fops = {
|
||||||
.owner= THIS_MODULE,
|
.owner= THIS_MODULE,
|
||||||
.llseek= no_llseek,
|
.llseek= no_llseek,
|
||||||
.write= fop_write,
|
.write= fop_write,
|
||||||
|
|
|
@ -183,7 +183,7 @@ static ssize_t at91_wdt_write(struct file *file, const char *data, size_t len, l
|
||||||
|
|
||||||
/* ......................................................................... */
|
/* ......................................................................... */
|
||||||
|
|
||||||
static struct file_operations at91wdt_fops = {
|
static const struct file_operations at91wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.ioctl = at91_wdt_ioctl,
|
.ioctl = at91_wdt_ioctl,
|
||||||
|
|
|
@ -145,7 +145,7 @@ static int booke_wdt_open (struct inode *inode, struct file *file)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations booke_wdt_fops = {
|
static const struct file_operations booke_wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = booke_wdt_write,
|
.write = booke_wdt_write,
|
||||||
|
|
|
@ -198,7 +198,7 @@ static ssize_t cpu5wdt_write(struct file *file, const char __user *buf, size_t c
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations cpu5wdt_fops = {
|
static const struct file_operations cpu5wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.ioctl = cpu5wdt_ioctl,
|
.ioctl = cpu5wdt_ioctl,
|
||||||
|
|
|
@ -187,7 +187,7 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations ep93xx_wdt_fops = {
|
static const struct file_operations ep93xx_wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.write = ep93xx_wdt_write,
|
.write = ep93xx_wdt_write,
|
||||||
.ioctl = ep93xx_wdt_ioctl,
|
.ioctl = ep93xx_wdt_ioctl,
|
||||||
|
|
|
@ -356,7 +356,7 @@ static int eurwdt_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations eurwdt_fops = {
|
static const struct file_operations eurwdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = eurwdt_write,
|
.write = eurwdt_write,
|
||||||
|
|
|
@ -337,7 +337,7 @@ static int esb_notify_sys (struct notifier_block *this, unsigned long code, void
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations esb_fops = {
|
static const struct file_operations esb_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = esb_write,
|
.write = esb_write,
|
||||||
|
|
|
@ -378,7 +378,7 @@ static int i8xx_tco_notify_sys (struct notifier_block *this, unsigned long code,
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations i8xx_tco_fops = {
|
static const struct file_operations i8xx_tco_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = i8xx_tco_write,
|
.write = i8xx_tco_write,
|
||||||
|
|
|
@ -255,7 +255,7 @@ ibwdt_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations ibwdt_fops = {
|
static const struct file_operations ibwdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = ibwdt_write,
|
.write = ibwdt_write,
|
||||||
|
|
|
@ -322,7 +322,7 @@ static int asr_release(struct inode *inode, struct file *file)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations asr_fops = {
|
static const struct file_operations asr_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = asr_write,
|
.write = asr_write,
|
||||||
|
|
|
@ -154,7 +154,7 @@ static int indydog_notify_sys(struct notifier_block *this, unsigned long code, v
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations indydog_fops = {
|
static const struct file_operations indydog_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = indydog_write,
|
.write = indydog_write,
|
||||||
|
|
|
@ -168,7 +168,7 @@ ixp2000_wdt_release(struct inode *inode, struct file *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations ixp2000_wdt_fops =
|
static const struct file_operations ixp2000_wdt_fops =
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
|
|
|
@ -162,7 +162,7 @@ ixp4xx_wdt_release(struct inode *inode, struct file *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations ixp4xx_wdt_fops =
|
static const struct file_operations ixp4xx_wdt_fops =
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
|
|
|
@ -388,7 +388,7 @@ static int zf_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations zf_fops = {
|
static const struct file_operations zf_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = zf_write,
|
.write = zf_write,
|
||||||
|
|
|
@ -190,7 +190,7 @@ static int mixcomwd_ioctl(struct inode *inode, struct file *file,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations mixcomwd_fops=
|
static const struct file_operations mixcomwd_fops=
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
|
|
|
@ -129,7 +129,7 @@ static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations mpc83xx_wdt_fops = {
|
static const struct file_operations mpc83xx_wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = mpc83xx_wdt_write,
|
.write = mpc83xx_wdt_write,
|
||||||
|
|
|
@ -132,7 +132,7 @@ static int mpc8xx_wdt_ioctl(struct inode *inode, struct file *file,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations mpc8xx_wdt_fops = {
|
static const struct file_operations mpc8xx_wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = mpc8xx_wdt_write,
|
.write = mpc8xx_wdt_write,
|
||||||
|
|
|
@ -297,7 +297,7 @@ static void mpcore_wdt_shutdown(struct platform_device *dev)
|
||||||
/*
|
/*
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
static struct file_operations mpcore_wdt_fops = {
|
static const struct file_operations mpcore_wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = mpcore_wdt_write,
|
.write = mpcore_wdt_write,
|
||||||
|
|
|
@ -166,7 +166,7 @@ static int mv64x60_wdt_ioctl(struct inode *inode, struct file *file,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations mv64x60_wdt_fops = {
|
static const struct file_operations mv64x60_wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = mv64x60_wdt_write,
|
.write = mv64x60_wdt_write,
|
||||||
|
|
|
@ -740,7 +740,7 @@ static int pcwd_notify_sys(struct notifier_block *this, unsigned long code, void
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations pcwd_fops = {
|
static const struct file_operations pcwd_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = pcwd_write,
|
.write = pcwd_write,
|
||||||
|
@ -755,7 +755,7 @@ static struct miscdevice pcwd_miscdev = {
|
||||||
.fops = &pcwd_fops,
|
.fops = &pcwd_fops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations pcwd_temp_fops = {
|
static const struct file_operations pcwd_temp_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = pcwd_temp_read,
|
.read = pcwd_temp_read,
|
||||||
|
|
|
@ -625,7 +625,7 @@ static int pcipcwd_notify_sys(struct notifier_block *this, unsigned long code, v
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations pcipcwd_fops = {
|
static const struct file_operations pcipcwd_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = pcipcwd_write,
|
.write = pcipcwd_write,
|
||||||
|
@ -640,7 +640,7 @@ static struct miscdevice pcipcwd_miscdev = {
|
||||||
.fops = &pcipcwd_fops,
|
.fops = &pcipcwd_fops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations pcipcwd_temp_fops = {
|
static const struct file_operations pcipcwd_temp_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = pcipcwd_temp_read,
|
.read = pcipcwd_temp_read,
|
||||||
|
|
|
@ -523,7 +523,7 @@ static int usb_pcwd_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations usb_pcwd_fops = {
|
static const struct file_operations usb_pcwd_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = usb_pcwd_write,
|
.write = usb_pcwd_write,
|
||||||
|
@ -538,7 +538,7 @@ static struct miscdevice usb_pcwd_miscdev = {
|
||||||
.fops = &usb_pcwd_fops,
|
.fops = &usb_pcwd_fops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations usb_pcwd_temperature_fops = {
|
static const struct file_operations usb_pcwd_temperature_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = usb_pcwd_temperature_read,
|
.read = usb_pcwd_temperature_read,
|
||||||
|
|
|
@ -319,7 +319,7 @@ static int s3c2410wdt_ioctl(struct inode *inode, struct file *file,
|
||||||
|
|
||||||
/* kernel interface */
|
/* kernel interface */
|
||||||
|
|
||||||
static struct file_operations s3c2410wdt_fops = {
|
static const struct file_operations s3c2410wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = s3c2410wdt_write,
|
.write = s3c2410wdt_write,
|
||||||
|
|
|
@ -135,7 +135,7 @@ static int sa1100dog_ioctl(struct inode *inode, struct file *file,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations sa1100dog_fops =
|
static const struct file_operations sa1100dog_fops =
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
|
|
|
@ -282,7 +282,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations wdt_fops = {
|
static const struct file_operations wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = fop_write,
|
.write = fop_write,
|
||||||
|
|
|
@ -305,7 +305,7 @@ static int sbc8360_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations sbc8360_fops = {
|
static const struct file_operations sbc8360_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = sbc8360_write,
|
.write = sbc8360_write,
|
||||||
|
|
|
@ -154,7 +154,7 @@ static int epx_c3_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations epx_c3_fops = {
|
static const struct file_operations epx_c3_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = epx_c3_write,
|
.write = epx_c3_write,
|
||||||
|
|
|
@ -292,7 +292,7 @@ static struct notifier_block sc1200wdt_notifier =
|
||||||
.notifier_call = sc1200wdt_notify_sys,
|
.notifier_call = sc1200wdt_notify_sys,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations sc1200wdt_fops =
|
static const struct file_operations sc1200wdt_fops =
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
|
|
|
@ -336,7 +336,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations wdt_fops = {
|
static const struct file_operations wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = fop_write,
|
.write = fop_write,
|
||||||
|
|
|
@ -194,7 +194,7 @@ static int scx200_wdt_ioctl(struct inode *inode, struct file *file,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations scx200_wdt_fops = {
|
static const struct file_operations scx200_wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = scx200_wdt_write,
|
.write = scx200_wdt_write,
|
||||||
|
|
|
@ -344,7 +344,7 @@ static int sh_wdt_notify_sys(struct notifier_block *this,
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations sh_wdt_fops = {
|
static const struct file_operations sh_wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = sh_wdt_write,
|
.write = sh_wdt_write,
|
||||||
|
|
|
@ -243,7 +243,7 @@ static int softdog_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations softdog_fops = {
|
static const struct file_operations softdog_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = softdog_write,
|
.write = softdog_write,
|
||||||
|
|
|
@ -274,7 +274,7 @@ wdt_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations wdt_fops = {
|
static const struct file_operations wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = wdt_write,
|
.write = wdt_write,
|
||||||
|
|
|
@ -299,7 +299,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations wdt_fops = {
|
static const struct file_operations wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = fop_write,
|
.write = fop_write,
|
||||||
|
|
|
@ -449,7 +449,7 @@ static int wdt_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations wdt_fops=
|
static const struct file_operations wdt_fops=
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
|
|
|
@ -222,7 +222,7 @@ static int wafwdt_notify_sys(struct notifier_block *this, unsigned long code, vo
|
||||||
* Kernel Interfaces
|
* Kernel Interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct file_operations wafwdt_fops = {
|
static const struct file_operations wafwdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = wafwdt_write,
|
.write = wafwdt_write,
|
||||||
|
|
|
@ -520,7 +520,7 @@ wdrtas_reboot(struct notifier_block *this, unsigned long code, void *ptr)
|
||||||
|
|
||||||
/*** initialization stuff */
|
/*** initialization stuff */
|
||||||
|
|
||||||
static struct file_operations wdrtas_fops = {
|
static const struct file_operations wdrtas_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = wdrtas_write,
|
.write = wdrtas_write,
|
||||||
|
@ -535,7 +535,7 @@ static struct miscdevice wdrtas_miscdev = {
|
||||||
.fops = &wdrtas_fops,
|
.fops = &wdrtas_fops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations wdrtas_temp_fops = {
|
static const struct file_operations wdrtas_temp_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = wdrtas_temp_read,
|
.read = wdrtas_temp_read,
|
||||||
|
|
|
@ -494,7 +494,7 @@ static int wdt_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations wdt_fops = {
|
static const struct file_operations wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = wdt_write,
|
.write = wdt_write,
|
||||||
|
@ -510,7 +510,7 @@ static struct miscdevice wdt_miscdev = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_WDT_501
|
#ifdef CONFIG_WDT_501
|
||||||
static struct file_operations wdt_temp_fops = {
|
static const struct file_operations wdt_temp_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = wdt_temp_read,
|
.read = wdt_temp_read,
|
||||||
|
|
|
@ -178,7 +178,7 @@ watchdog_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations watchdog_fops = {
|
static const struct file_operations watchdog_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = watchdog_write,
|
.write = watchdog_write,
|
||||||
|
|
|
@ -418,7 +418,7 @@ static int wdt977_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations wdt977_fops=
|
static const struct file_operations wdt977_fops=
|
||||||
{
|
{
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
|
|
|
@ -543,7 +543,7 @@ static int wdtpci_notify_sys(struct notifier_block *this, unsigned long code,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static struct file_operations wdtpci_fops = {
|
static const struct file_operations wdtpci_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = wdtpci_write,
|
.write = wdtpci_write,
|
||||||
|
@ -559,7 +559,7 @@ static struct miscdevice wdtpci_miscdev = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_WDT_501_PCI
|
#ifdef CONFIG_WDT_501_PCI
|
||||||
static struct file_operations wdtpci_temp_fops = {
|
static const struct file_operations wdtpci_temp_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.read = wdtpci_temp_read,
|
.read = wdtpci_temp_read,
|
||||||
|
|
Loading…
Reference in a new issue