Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] media/radio: use v4l2_ctrl_subscribe_event where possible

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Hans de Goede and committed by
Mauro Carvalho Chehab
a22d85fe 6c493f8b

+2 -22
+1 -9
drivers/media/radio/radio-isa.c
··· 150 150 return 0; 151 151 } 152 152 153 - static int radio_isa_subscribe_event(struct v4l2_fh *fh, 154 - struct v4l2_event_subscription *sub) 155 - { 156 - if (sub->type == V4L2_EVENT_CTRL) 157 - return v4l2_event_subscribe(fh, sub, 0); 158 - return -EINVAL; 159 - } 160 - 161 153 static const struct v4l2_ctrl_ops radio_isa_ctrl_ops = { 162 154 .s_ctrl = radio_isa_s_ctrl, 163 155 }; ··· 169 177 .vidioc_g_frequency = radio_isa_g_frequency, 170 178 .vidioc_s_frequency = radio_isa_s_frequency, 171 179 .vidioc_log_status = radio_isa_log_status, 172 - .vidioc_subscribe_event = radio_isa_subscribe_event, 180 + .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, 173 181 .vidioc_unsubscribe_event = v4l2_event_unsubscribe, 174 182 }; 175 183
+1 -13
drivers/media/radio/radio-keene.c
··· 271 271 return -EINVAL; 272 272 } 273 273 274 - static int vidioc_subscribe_event(struct v4l2_fh *fh, 275 - struct v4l2_event_subscription *sub) 276 - { 277 - switch (sub->type) { 278 - case V4L2_EVENT_CTRL: 279 - return v4l2_event_subscribe(fh, sub, 0); 280 - default: 281 - return -EINVAL; 282 - } 283 - } 284 - 285 - 286 274 /* File system interface */ 287 275 static const struct v4l2_file_operations usb_keene_fops = { 288 276 .owner = THIS_MODULE, ··· 291 303 .vidioc_g_frequency = vidioc_g_frequency, 292 304 .vidioc_s_frequency = vidioc_s_frequency, 293 305 .vidioc_log_status = v4l2_ctrl_log_status, 294 - .vidioc_subscribe_event = vidioc_subscribe_event, 306 + .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, 295 307 .vidioc_unsubscribe_event = v4l2_event_unsubscribe, 296 308 }; 297 309