aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cs46xx/cs46xx_lib.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:36:56 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:36:56 -0400
commitcf9b59e9d3e008591d1f54830f570982bb307a0d (patch)
tree113478ce8fd8c832ba726ffdf59b82cb46356476 /sound/pci/cs46xx/cs46xx_lib.c
parent44504b2bebf8b5823c59484e73096a7d6574471d (diff)
parentf4b87dee923342505e1ddba8d34ce9de33e75050 (diff)
Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'sound/pci/cs46xx/cs46xx_lib.c')
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index 3f99a5e8528c..aad37082cb6e 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -2657,21 +2657,16 @@ static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip) { }
2657 * proc interface 2657 * proc interface
2658 */ 2658 */
2659 2659
2660static long snd_cs46xx_io_read(struct snd_info_entry *entry, void *file_private_data, 2660static ssize_t snd_cs46xx_io_read(struct snd_info_entry *entry,
2661 struct file *file, char __user *buf, 2661 void *file_private_data,
2662 unsigned long count, unsigned long pos) 2662 struct file *file, char __user *buf,
2663 size_t count, loff_t pos)
2663{ 2664{
2664 long size;
2665 struct snd_cs46xx_region *region = entry->private_data; 2665 struct snd_cs46xx_region *region = entry->private_data;
2666 2666
2667 size = count; 2667 if (copy_to_user_fromio(buf, region->remap_addr + pos, count))
2668 if (pos + (size_t)size > region->size) 2668 return -EFAULT;
2669 size = region->size - pos; 2669 return count;
2670 if (size > 0) {
2671 if (copy_to_user_fromio(buf, region->remap_addr + pos, size))
2672 return -EFAULT;
2673 }
2674 return size;
2675} 2670}
2676 2671
2677static struct snd_info_entry_ops snd_cs46xx_proc_io_ops = { 2672static struct snd_info_entry_ops snd_cs46xx_proc_io_ops = {