Le Jeudi 26 Avril 2007 21:47, Thomas Kaiser a =E9crit=A0:
> emmanuel simonnet wrote:
> >> Hello Emmanuel
> >>
> >> Replace the code in spca50x_create_sysfs() with this one:
> >> static int
> >> spca50x_create_sysfs(struct video_device *vdev)
> >> {
> >> video_device_create_file(vdev, &class_device_attr_stream_id);
> >> video_device_create_file(vdev, &class_device_attr_model);
> >> video_device_create_file(vdev, &class_device_attr_pictsetting);
> >>
> >> return 0;
> >> }
> >>
> >> and it should be possible to compile.
> >
> > Thanks for the hint but static int is already in the code.
> >
> > Part of gspca_core.c :
> >
> > static CLASS_DEVICE_ATTR(pictsetting, S_IRUGO, show_pictsetting, NULL);
> > static int
> > spca50x_create_sysfs(struct video_device *vdev)
> > {
> > int rc;
> >
> > rc =3D video_device_create_file(vdev, &class_device_attr_stream_id);
> > if (rc) goto err_stream_id;
> > rc =3D video_device_create_file(vdev, &class_device_attr_model);
> > if (rc) goto err_model;
> > rc =3D video_device_create_file(vdev, &class_device_attr_pictsetting);
> > if (rc) goto err_pictsetting;
> >
> > return 0;
> >
> > err_pictsetting:
> > video_device_remove_file(vdev, &class_device_attr_model);
> > err_model:
> > video_device_remove_file(vdev, &class_device_attr_stream_id);
> > err_stream_id:
> > return rc;
> >
> > Should be sthg else.
> >
> >> Should be good enough to see if your cam is working, now.
> >
> > Yes,i definitely want to see my cam working.
> >
> >> Have fun :-)
> >>
> >> Thomas
>
> OK, your new code should look like this (the old (new) function
> commented out):
>
> ........
> static CLASS_DEVICE_ATTR(pictsetting, S_IRUGO, show_pictsetting, NULL);
> /*
> static int
> spca50x_create_sysfs(struct video_device *vdev)
> {
> int rc;
> rc =3D 0;
>
> rc =3D video_device_create_file(vdev, &class_device_attr_stream_id);
> if (rc) goto err_stream_id;
> rc =3D video_device_create_file(vdev, &class_device_attr_model);
> if (rc) goto err_model;
> rc =3D video_device_create_file(vdev, &class_device_attr_pictsetting);
> if (rc) goto err_pictsetting;
>
> return 0;
>
> err_pictsetting:
> video_device_remove_file(vdev, &class_device_attr_model);
> err_model:
> video_device_remove_file(vdev, &class_device_attr_stream_id);
> err_stream_id:
> return rc;
> }
> */
> static int
> spca50x_create_sysfs(struct video_device *vdev)
> {
> video_device_create_file(vdev, &class_device_attr_stream_id);
> video_device_create_file(vdev, &class_device_attr_model);
> video_device_create_file(vdev, &class_device_attr_pictsetting);
>
> return 0;
> }
>
> /************************************************************************=
**
>** *
> * USB routines
> *
> *************************************************************************=
**
>/ static int
> gspca_attach_bridge(struct usb_spca50x *spca50x)
> {
> ........
> Hope this will clarify?
>
> Thomas
I will investigate tomorrow but it compile and run fine for me :(
=2D-=20
Michel Xhaard
http://mxhaard.free.fr
|