diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/agp/frontend.c | 1 | ||||
-rw-r--r-- | drivers/char/agp/generic.c | 1 | ||||
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 1 | ||||
-rw-r--r-- | drivers/char/agp/sgi-agp.c | 1 | ||||
-rw-r--r-- | drivers/char/hw_random/bcm2835-rng.c | 1 | ||||
-rw-r--r-- | drivers/char/hw_random/core.c | 1 | ||||
-rw-r--r-- | drivers/char/hw_random/exynos-rng.c | 1 | ||||
-rw-r--r-- | drivers/char/hw_random/n2-drv.c | 1 | ||||
-rw-r--r-- | drivers/char/hw_random/nomadik-rng.c | 1 | ||||
-rw-r--r-- | drivers/char/hw_random/octeon-rng.c | 1 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 1 | ||||
-rw-r--r-- | drivers/char/mem.c | 6 | ||||
-rw-r--r-- | drivers/char/mwave/3780i.c | 1 | ||||
-rw-r--r-- | drivers/char/tile-srom.c | 1 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_i2c_infineon.c | 1 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_i2c_stm_st33.c | 1 |
16 files changed, 6 insertions, 15 deletions
diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c index 1b192395a90..8121b4c70ed 100644 --- a/drivers/char/agp/frontend.c +++ b/drivers/char/agp/frontend.c @@ -31,7 +31,6 @@ #include <linux/module.h> #include <linux/mman.h> #include <linux/pci.h> -#include <linux/init.h> #include <linux/miscdevice.h> #include <linux/agp_backend.h> #include <linux/agpgart.h> diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index f39437addb5..0fbccce1cee 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c @@ -29,7 +29,6 @@ */ #include <linux/module.h> #include <linux/pci.h> -#include <linux/init.h> #include <linux/pagemap.h> #include <linux/miscdevice.h> #include <linux/pm.h> diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index 5c85350f4c3..9a024f899dd 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -17,7 +17,6 @@ #include <linux/module.h> #include <linux/pci.h> -#include <linux/init.h> #include <linux/kernel.h> #include <linux/pagemap.h> #include <linux/agp_backend.h> diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index 05b8d0241bd..3051c73bc38 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c @@ -15,7 +15,6 @@ #include <linux/module.h> #include <linux/pci.h> #include <linux/slab.h> -#include <linux/init.h> #include <linux/agp_backend.h> #include <asm/sn/addrs.h> #include <asm/sn/io.h> diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c index 43577ca780e..8c3b255e629 100644 --- a/drivers/char/hw_random/bcm2835-rng.c +++ b/drivers/char/hw_random/bcm2835-rng.c @@ -8,7 +8,6 @@ */ #include <linux/hw_random.h> -#include <linux/init.h> #include <linux/io.h> #include <linux/kernel.h> #include <linux/module.h> diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index a0f7724852e..b9495a8c05c 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c @@ -37,7 +37,6 @@ #include <linux/kernel.h> #include <linux/fs.h> #include <linux/sched.h> -#include <linux/init.h> #include <linux/miscdevice.h> #include <linux/delay.h> #include <linux/slab.h> diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index 402ccfb625c..9f8277cc44b 100644 --- a/drivers/char/hw_random/exynos-rng.c +++ b/drivers/char/hw_random/exynos-rng.c @@ -22,7 +22,6 @@ #include <linux/hw_random.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/init.h> #include <linux/io.h> #include <linux/platform_device.h> #include <linux/clk.h> diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c index f9beed54d0c..432232eefe0 100644 --- a/drivers/char/hw_random/n2-drv.c +++ b/drivers/char/hw_random/n2-drv.c @@ -7,7 +7,6 @@ #include <linux/module.h> #include <linux/types.h> #include <linux/delay.h> -#include <linux/init.h> #include <linux/slab.h> #include <linux/workqueue.h> #include <linux/preempt.h> diff --git a/drivers/char/hw_random/nomadik-rng.c b/drivers/char/hw_random/nomadik-rng.c index 232b87fb5fc..00e9d2d4663 100644 --- a/drivers/char/hw_random/nomadik-rng.c +++ b/drivers/char/hw_random/nomadik-rng.c @@ -10,7 +10,6 @@ #include <linux/kernel.h> #include <linux/module.h> -#include <linux/init.h> #include <linux/device.h> #include <linux/amba/bus.h> #include <linux/hw_random.h> diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers/char/hw_random/octeon-rng.c index f2885dbe184..b5cc3420c65 100644 --- a/drivers/char/hw_random/octeon-rng.c +++ b/drivers/char/hw_random/octeon-rng.c @@ -10,7 +10,6 @@ */ #include <linux/module.h> -#include <linux/init.h> #include <linux/platform_device.h> #include <linux/device.h> #include <linux/hw_random.h> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 03f41896d09..b7efd3c1a88 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -61,7 +61,6 @@ #include <linux/ipmi_smi.h> #include <asm/io.h> #include "ipmi_si_sm.h" -#include <linux/init.h> #include <linux/dmi.h> #include <linux/string.h> #include <linux/ctype.h> diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 92c5937f80c..917403fe10d 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -99,6 +99,9 @@ static ssize_t read_mem(struct file *file, char __user *buf, ssize_t read, sz; char *ptr; + if (p != *ppos) + return 0; + if (!valid_phys_addr_range(p, count)) return -EFAULT; read = 0; @@ -157,6 +160,9 @@ static ssize_t write_mem(struct file *file, const char __user *buf, unsigned long copied; void *ptr; + if (p != *ppos) + return -EFBIG; + if (!valid_phys_addr_range(p, count)) return -EFAULT; diff --git a/drivers/char/mwave/3780i.c b/drivers/char/mwave/3780i.c index 881c9e59593..28740046bc8 100644 --- a/drivers/char/mwave/3780i.c +++ b/drivers/char/mwave/3780i.c @@ -50,7 +50,6 @@ #include <linux/unistd.h> #include <linux/delay.h> #include <linux/ioport.h> -#include <linux/init.h> #include <linux/bitops.h> #include <linux/sched.h> /* cond_resched() */ diff --git a/drivers/char/tile-srom.c b/drivers/char/tile-srom.c index 0e506bad198..bd377472dcf 100644 --- a/drivers/char/tile-srom.c +++ b/drivers/char/tile-srom.c @@ -20,7 +20,6 @@ #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/init.h> #include <linux/kernel.h> /* printk() */ #include <linux/slab.h> /* kmalloc() */ #include <linux/fs.h> /* everything... */ diff --git a/drivers/char/tpm/tpm_i2c_infineon.c b/drivers/char/tpm/tpm_i2c_infineon.c index 52b9b2b2f30..472af4bb1b6 100644 --- a/drivers/char/tpm/tpm_i2c_infineon.c +++ b/drivers/char/tpm/tpm_i2c_infineon.c @@ -21,7 +21,6 @@ * * */ -#include <linux/init.h> #include <linux/i2c.h> #include <linux/module.h> #include <linux/wait.h> diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c b/drivers/char/tpm/tpm_i2c_stm_st33.c index 5b0dd8ef74c..3b7bf216289 100644 --- a/drivers/char/tpm/tpm_i2c_stm_st33.c +++ b/drivers/char/tpm/tpm_i2c_stm_st33.c @@ -38,7 +38,6 @@ #include <linux/miscdevice.h> #include <linux/kernel.h> #include <linux/delay.h> -#include <linux/init.h> #include <linux/wait.h> #include <linux/string.h> #include <linux/interrupt.h> |