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

[media] pvrusb2: drop g/s_register ioctls

Register access to subdevices no longer needs bridge support for those
ioctls. The v4l2 core handles that these days.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Mike Isely <isely@isely.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
43aea901 f82fadcf

-79
-36
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
··· 5162 5162 } while(0); LOCK_GIVE(hdw->ctl_lock); 5163 5163 return result; 5164 5164 } 5165 - 5166 - 5167 - int pvr2_hdw_register_access(struct pvr2_hdw *hdw, 5168 - const struct v4l2_dbg_match *match, u64 reg_id, 5169 - int setFl, u64 *val_ptr) 5170 - { 5171 - #ifdef CONFIG_VIDEO_ADV_DEBUG 5172 - struct v4l2_dbg_register req; 5173 - int stat = 0; 5174 - int okFl = 0; 5175 - 5176 - req.match = *match; 5177 - req.reg = reg_id; 5178 - if (setFl) req.val = *val_ptr; 5179 - /* It would be nice to know if a sub-device answered the request */ 5180 - v4l2_device_call_all(&hdw->v4l2_dev, 0, core, g_register, &req); 5181 - if (!setFl) *val_ptr = req.val; 5182 - if (okFl) { 5183 - return stat; 5184 - } 5185 - return -EINVAL; 5186 - #else 5187 - return -ENOSYS; 5188 - #endif 5189 - } 5190 - 5191 - 5192 - /* 5193 - Stuff for Emacs to see, in order to encourage consistent editing style: 5194 - *** Local Variables: *** 5195 - *** mode: c *** 5196 - *** fill-column: 75 *** 5197 - *** tab-width: 8 *** 5198 - *** c-basic-offset: 8 *** 5199 - *** End: *** 5200 - */
-9
drivers/media/usb/pvrusb2/pvrusb2-hdw.h
··· 234 234 void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *, 235 235 enum pvr2_v4l_type index,int); 236 236 237 - /* Direct read/write access to chip's registers: 238 - match - specify criteria to identify target chip (this is a v4l dbg struct) 239 - reg_id - register number to access 240 - setFl - true to set the register, false to read it 241 - val_ptr - storage location for source / result. */ 242 - int pvr2_hdw_register_access(struct pvr2_hdw *, 243 - const struct v4l2_dbg_match *match, u64 reg_id, 244 - int setFl, u64 *val_ptr); 245 - 246 237 /* The following entry points are all lower level things you normally don't 247 238 want to worry about. */ 248 239
-34
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
··· 800 800 return 0; 801 801 } 802 802 803 - #ifdef CONFIG_VIDEO_ADV_DEBUG 804 - static int pvr2_g_register(struct file *file, void *priv, struct v4l2_dbg_register *req) 805 - { 806 - struct pvr2_v4l2_fh *fh = file->private_data; 807 - struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; 808 - u64 val; 809 - int ret; 810 - 811 - ret = pvr2_hdw_register_access( 812 - hdw, &req->match, req->reg, 813 - 0, &val); 814 - req->val = val; 815 - return ret; 816 - } 817 - 818 - static int pvr2_s_register(struct file *file, void *priv, const struct v4l2_dbg_register *req) 819 - { 820 - struct pvr2_v4l2_fh *fh = file->private_data; 821 - struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; 822 - u64 val; 823 - int ret; 824 - 825 - val = req->val; 826 - ret = pvr2_hdw_register_access( 827 - hdw, &req->match, req->reg, 828 - 1, &val); 829 - return ret; 830 - } 831 - #endif 832 - 833 803 static const struct v4l2_ioctl_ops pvr2_ioctl_ops = { 834 804 .vidioc_querycap = pvr2_querycap, 835 805 .vidioc_g_priority = pvr2_g_priority, ··· 834 864 .vidioc_g_ext_ctrls = pvr2_g_ext_ctrls, 835 865 .vidioc_s_ext_ctrls = pvr2_s_ext_ctrls, 836 866 .vidioc_try_ext_ctrls = pvr2_try_ext_ctrls, 837 - #ifdef CONFIG_VIDEO_ADV_DEBUG 838 - .vidioc_g_register = pvr2_g_register, 839 - .vidioc_s_register = pvr2_s_register, 840 - #endif 841 867 }; 842 868 843 869 static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip)