permit multiline comments and strings in macros
[bpt/coccinelle.git] / tests / video_ver3.c
1 static int typhoon_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
2 {
3 struct typhoon_device *typhoon = dev->priv;
4
5 switch (cmd) {
6 case VIDIOCGTUNER:
7 {
8 struct video_tuner v;
9 if (copy_from_user(&v, arg, sizeof(v)) != 0)
10 return -EFAULT;
11 if (v.tuner) /* Only 1 tuner */
12 return -EINVAL;
13 v.rangelow = 875 * 1600;
14 v.rangehigh = 1080 * 1600;
15 v.flags = VIDEO_TUNER_LOW;
16 v.mode = VIDEO_MODE_AUTO;
17 v.signal = 0xFFFF; /* We can't get the signal strength */
18 strcpy(v.name, "FM");
19 if (copy_to_user(arg, &v, sizeof(v)))
20 return -EFAULT;
21 return 0;
22 }
23 }
24 return -ENOIOCTLCMD;
25 }