1 static int typhoon_ioctl(struct video_device
*dev
, unsigned int cmd
, void *arg
)
3 struct typhoon_device
*typhoon
= dev
->priv
;
5 if (cmd
== VIDIOCGTUNER
) {
7 if (copy_from_user(v
, arg
, sizeof(v
)) != 0)
9 if (v
.tuner
) /* Only 1 tuner */
11 v
.rangelow
= 875 * 1600;
12 v
.rangehigh
= 1080 * 1600;
13 v
.flags
= VIDEO_TUNER_LOW
;
14 v
.mode
= VIDEO_MODE_AUTO
;
15 v
.signal
= 0xFFFF; /* We can't get the signal strength */
17 if (copy_to_user(arg
, v
, sizeof(v
)))
21 else if (cmd == VIDIOCSTUNER) {
23 if (copy_from_user(v, arg, sizeof(v)))
29 else if(cmd == VIDIOCSFREQ) {
30 if (copy_from_user(typhoon->curfreq, arg, sizeof(typhoon->curfreq)))
32 typhoon_setfreq(typhoon, typhoon->curfreq);