X-Git-Url: http://git.agner.ch/gitweb/?p=linux-drm-fsl-dcu.git;a=blobdiff_plain;f=drivers%2Fsbus%2Fchar%2Fvfc_dev.c;h=37a04a0cecfa9449cdc6e1547e77a97eafa9d90c;hp=55b2b31bd7abbf0d2dbcde64af303c952b442821;hb=7baca6ad0ef09c8a78d798c93a3ce25336e8f50f;hpb=db1a19b38f3a85f475b4ad716c71be133d8ca48e diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 55b2b31bd7ab..37a04a0cecfa 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c @@ -44,7 +44,7 @@ #include "vfc.h" #include -static struct file_operations vfc_fops; +static const struct file_operations vfc_fops; struct vfc_dev **vfc_dev_lst; static char vfcstr[]="vfc"; static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { @@ -610,7 +610,7 @@ static int vfc_mmap(struct file *file, struct vm_area_struct *vma) unsigned int map_size, ret, map_offset; struct vfc_dev *dev; - dev = vfc_get_dev_ptr(iminor(file->f_dentry->d_inode)); + dev = vfc_get_dev_ptr(iminor(file->f_path.dentry->d_inode)); if(dev == NULL) return -ENODEV; @@ -633,7 +633,7 @@ static int vfc_mmap(struct file *file, struct vm_area_struct *vma) } -static struct file_operations vfc_fops = { +static const struct file_operations vfc_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = vfc_ioctl, @@ -659,7 +659,7 @@ static int vfc_probe(void) if (!cards) return -ENODEV; - vfc_dev_lst = (struct vfc_dev **)kmalloc(sizeof(struct vfc_dev *) * + vfc_dev_lst = kmalloc(sizeof(struct vfc_dev *) * (cards+1), GFP_KERNEL); if (vfc_dev_lst == NULL)