diff options
Diffstat (limited to 'drivers/media/radio/radio-trust.c')
-rw-r--r-- | drivers/media/radio/radio-trust.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/radio/radio-trust.c b/drivers/media/radio/radio-trust.c index 9d6dcf8af5b0..22fa9cc28abe 100644 --- a/drivers/media/radio/radio-trust.c +++ b/drivers/media/radio/radio-trust.c | |||
@@ -344,7 +344,7 @@ static int vidioc_s_audio(struct file *file, void *priv, | |||
344 | 344 | ||
345 | static const struct v4l2_file_operations trust_fops = { | 345 | static const struct v4l2_file_operations trust_fops = { |
346 | .owner = THIS_MODULE, | 346 | .owner = THIS_MODULE, |
347 | .ioctl = video_ioctl2, | 347 | .unlocked_ioctl = video_ioctl2, |
348 | }; | 348 | }; |
349 | 349 | ||
350 | static const struct v4l2_ioctl_ops trust_ioctl_ops = { | 350 | static const struct v4l2_ioctl_ops trust_ioctl_ops = { |
@@ -396,14 +396,6 @@ static int __init trust_init(void) | |||
396 | tr->vdev.release = video_device_release_empty; | 396 | tr->vdev.release = video_device_release_empty; |
397 | video_set_drvdata(&tr->vdev, tr); | 397 | video_set_drvdata(&tr->vdev, tr); |
398 | 398 | ||
399 | if (video_register_device(&tr->vdev, VFL_TYPE_RADIO, radio_nr) < 0) { | ||
400 | v4l2_device_unregister(v4l2_dev); | ||
401 | release_region(tr->io, 2); | ||
402 | return -EINVAL; | ||
403 | } | ||
404 | |||
405 | v4l2_info(v4l2_dev, "Trust FM Radio card driver v1.0.\n"); | ||
406 | |||
407 | write_i2c(tr, 2, TDA7318_ADDR, 0x80); /* speaker att. LF = 0 dB */ | 399 | write_i2c(tr, 2, TDA7318_ADDR, 0x80); /* speaker att. LF = 0 dB */ |
408 | write_i2c(tr, 2, TDA7318_ADDR, 0xa0); /* speaker att. RF = 0 dB */ | 400 | write_i2c(tr, 2, TDA7318_ADDR, 0xa0); /* speaker att. RF = 0 dB */ |
409 | write_i2c(tr, 2, TDA7318_ADDR, 0xc0); /* speaker att. LR = 0 dB */ | 401 | write_i2c(tr, 2, TDA7318_ADDR, 0xc0); /* speaker att. LR = 0 dB */ |
@@ -418,6 +410,14 @@ static int __init trust_init(void) | |||
418 | /* mute card - prevents noisy bootups */ | 410 | /* mute card - prevents noisy bootups */ |
419 | tr_setmute(tr, 1); | 411 | tr_setmute(tr, 1); |
420 | 412 | ||
413 | if (video_register_device(&tr->vdev, VFL_TYPE_RADIO, radio_nr) < 0) { | ||
414 | v4l2_device_unregister(v4l2_dev); | ||
415 | release_region(tr->io, 2); | ||
416 | return -EINVAL; | ||
417 | } | ||
418 | |||
419 | v4l2_info(v4l2_dev, "Trust FM Radio card driver v1.0.\n"); | ||
420 | |||
421 | return 0; | 421 | return 0; |
422 | } | 422 | } |
423 | 423 | ||