diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-04-05 15:08:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-04-17 05:16:37 -0400 |
commit | 58757984ca3c73284a45dd53ac66f1414057cd09 (patch) | |
tree | a0eff49b9ae2a25f699fcda13618796a4f013d8d /drivers/media/radio/si470x/radio-si470x-usb.c | |
parent | 84fc727ed49ca2e940f2369ffde6e2c317d85335 (diff) | |
download | talos-obmc-linux-58757984ca3c73284a45dd53ac66f1414057cd09.tar.gz talos-obmc-linux-58757984ca3c73284a45dd53ac66f1414057cd09.zip |
media: si470x: allow build both USB and I2C at the same time
Currently, either USB or I2C is built. Change it to allow
having both enabled at the same time.
The main reason is that COMPILE_TEST all[yes/mod]builds will
now contain all drivers under drivers/media.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/radio/si470x/radio-si470x-usb.c')
-rw-r--r-- | drivers/media/radio/si470x/radio-si470x-usb.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si470x-usb.c index 2277e850bb5e..313a95f195a2 100644 --- a/drivers/media/radio/si470x/radio-si470x-usb.c +++ b/drivers/media/radio/si470x/radio-si470x-usb.c @@ -250,7 +250,7 @@ static int si470x_set_report(struct si470x_device *radio, void *buf, int size) /* * si470x_get_register - read register */ -int si470x_get_register(struct si470x_device *radio, int regnr) +static int si470x_get_register(struct si470x_device *radio, int regnr) { int retval; @@ -268,7 +268,7 @@ int si470x_get_register(struct si470x_device *radio, int regnr) /* * si470x_set_register - write register */ -int si470x_set_register(struct si470x_device *radio, int regnr) +static int si470x_set_register(struct si470x_device *radio, int regnr) { int retval; @@ -482,12 +482,12 @@ resubmit: } -int si470x_fops_open(struct file *file) +static int si470x_fops_open(struct file *file) { return v4l2_fh_open(file); } -int si470x_fops_release(struct file *file) +static int si470x_fops_release(struct file *file) { return v4l2_fh_release(file); } @@ -514,8 +514,8 @@ static void si470x_usb_release(struct v4l2_device *v4l2_dev) /* * si470x_vidioc_querycap - query device capabilities */ -int si470x_vidioc_querycap(struct file *file, void *priv, - struct v4l2_capability *capability) +static int si470x_vidioc_querycap(struct file *file, void *priv, + struct v4l2_capability *capability) { struct si470x_device *radio = video_drvdata(file); @@ -598,6 +598,12 @@ static int si470x_usb_driver_probe(struct usb_interface *intf, mutex_init(&radio->lock); init_completion(&radio->completion); + radio->get_register = si470x_get_register; + radio->set_register = si470x_set_register; + radio->fops_open = si470x_fops_open; + radio->fops_release = si470x_fops_release; + radio->vidioc_querycap = si470x_vidioc_querycap; + iface_desc = intf->cur_altsetting; /* Set up interrupt endpoint information. */ |