2.5.3-pre2: drivers/ieee1394/video1394.c

2.5.3-pre2: drivers/ieee1394/video1394.c

Post by Frank Davi » Tue, 22 Jan 2002 02:50:12



Hello all,
   This patch fixes some of the compile errors in 2.5.3-pre2, MINOR ->
minor
Regards,
Frank

--- drivers/ieee1394/video1394.c.old    Mon Jan 14 21:54:46 2002

                struct video_card *p;
                list_for_each(lh, &video1394_cards) {
                        p = list_entry(lh, struct video_card, list);
-                       if (p->id == MINOR(inode->i_rdev)) {
+                       if (p->id == minor(inode->i_rdev)) {
                                video = p;
                                ohci = video->ohci;

        spin_unlock_irqrestore(&video1394_cards_lock, flags);

        if (video == NULL) {
-               PRINT_G(KERN_ERR, __FUNCTION__": Unknown video card for minor %d", MINOR(inode->i_rdev));
+               PRINT_G(KERN_ERR, __FUNCTION__": Unknown video card for minor %d", minor(inode->i_rdev));
                return -EFAULT;
        }

                struct video_card *p;
                list_for_each(lh, &video1394_cards) {
                        p = list_entry(lh, struct video_card, list);
-                       if (p->id == MINOR(file->f_dentry->d_inode->i_rdev)) {
+                       if (p->id == minor(file->f_dentry->d_inode->i_rdev)) {
                                video = p;
                                break;

        if (video == NULL) {
                PRINT_G(KERN_ERR, __FUNCTION__": Unknown video card for minor %d",
-                       MINOR(file->f_dentry->d_inode->i_rdev));
+                       minor(file->f_dentry->d_inode->i_rdev));
                return -EFAULT;
        }

 static int video1394_open(struct inode *inode, struct file *file)
 {
-       int i = MINOR(inode->i_rdev);
+       int i = minor(inode->i_rdev);
        unsigned long flags;
        struct video_card *video = NULL;

                struct video_card *p;
                list_for_each(lh, &video1394_cards) {
                        p = list_entry(lh, struct video_card, list);
-                       if (p->id == MINOR(inode->i_rdev)) {
+                       if (p->id == minor(inode->i_rdev)) {
                                video = p;
                                break;

        if (video == NULL) {
                PRINT_G(KERN_ERR, __FUNCTION__": Unknown device for minor %d",
-                               MINOR(inode->i_rdev));
+                               minor(inode->i_rdev));
                return 1;
        }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.3-pre2: drivers/ieee1394/video1394.c

Post by Frank Davi » Tue, 22 Jan 2002 03:00:16


Hello all,
   fyi: The last error (line 831) is regarding
remap_page_range(struct vm_area_struct, unsigned long, unsigned long,
unsigned long, pgprot_t )
Regards,
Frank


> Hello all,
>    This patch fixes some of the compile errors in 2.5.3-pre2, MINOR ->
> minor
> Regards,
> Frank

> --- drivers/ieee1394/video1394.c.old       Mon Jan 14 21:54:46 2002
> +++ drivers/ieee1394/video1394.c   Sun Jan 20 12:24:41 2002

>            struct video_card *p;
>            list_for_each(lh, &video1394_cards) {
>                    p = list_entry(lh, struct video_card, list);
> -                  if (p->id == MINOR(inode->i_rdev)) {
> +                  if (p->id == minor(inode->i_rdev)) {
>                            video = p;
>                            ohci = video->ohci;
>                            break;

>    spin_unlock_irqrestore(&video1394_cards_lock, flags);

>    if (video == NULL) {
> -          PRINT_G(KERN_ERR, __FUNCTION__": Unknown video card for minor %d", MINOR(inode->i_rdev));
> +          PRINT_G(KERN_ERR, __FUNCTION__": Unknown video card for minor %d", minor(inode->i_rdev));
>            return -EFAULT;
>    }


>            struct video_card *p;
>            list_for_each(lh, &video1394_cards) {
>                    p = list_entry(lh, struct video_card, list);
> -                  if (p->id == MINOR(file->f_dentry->d_inode->i_rdev)) {
> +                  if (p->id == minor(file->f_dentry->d_inode->i_rdev)) {
>                            video = p;
>                            break;
>                    }

>    if (video == NULL) {
>            PRINT_G(KERN_ERR, __FUNCTION__": Unknown video card for minor %d",
> -                  MINOR(file->f_dentry->d_inode->i_rdev));
> +                  minor(file->f_dentry->d_inode->i_rdev));
>            return -EFAULT;
>    }


>  static int video1394_open(struct inode *inode, struct file *file)
>  {
> -  int i = MINOR(inode->i_rdev);
> +  int i = minor(inode->i_rdev);
>    unsigned long flags;
>    struct video_card *video = NULL;
>    struct list_head *lh;

>            struct video_card *p;
>            list_for_each(lh, &video1394_cards) {
>                    p = list_entry(lh, struct video_card, list);
> -                  if (p->id == MINOR(inode->i_rdev)) {
> +                  if (p->id == minor(inode->i_rdev)) {
>                            video = p;
>                            break;
>                    }

>    if (video == NULL) {
>            PRINT_G(KERN_ERR, __FUNCTION__": Unknown device for minor %d",
> -                          MINOR(inode->i_rdev));
> +                          minor(inode->i_rdev));
>            return 1;
>    }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/