V4L/DVB (5146): Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal only

The direct register access ioctls were defined as kernel internal only,
but they are very useful for debugging hardware from userspace and are
used as such.  Officially export them.

VIDIOC_INT_[SG]_REGISTER is renamed to VIDIOC_DBG_[SG]_REGISTER 
Definition of ioctl and struct v4l2_register is moved from v4l2-common.h 
to videodev2.h.

Types used in struct v4l2_register are changed to the userspace 
exportable versions (u32 -> __u32, etc). 

Use of VIDIOC_DBG_S_REGISTER requires CAP_SYS_ADMIN permission, so move 
the check into the video_ioctl2() dispatcher so it doesn't need to be 
duplicated in each driver's call-back function. CAP_SYS_ADMIN check is 
added to pvrusb2 (which doesn't use video_ioctl2).

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 5e166ed..2a35075 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -3277,7 +3277,7 @@
 
 
 int pvr2_hdw_register_access(struct pvr2_hdw *hdw,
-			     u32 chip_id,unsigned long reg_id,
+			     u32 chip_id, u32 reg_id,
 			     int setFl,u32 *val_ptr)
 {
 #ifdef CONFIG_VIDEO_ADV_DEBUG
@@ -3295,8 +3295,8 @@
 			cp = list_entry(item,struct pvr2_i2c_client,list);
 			if (cp->client->driver->id != chip_id) continue;
 			stat = pvr2_i2c_client_cmd(
-				cp,(setFl ? VIDIOC_INT_S_REGISTER :
-				    VIDIOC_INT_G_REGISTER),&req);
+				cp,(setFl ? VIDIOC_DBG_S_REGISTER :
+				    VIDIOC_DBG_G_REGISTER),&req);
 			if (!setFl) *val_ptr = req.val;
 			okFl = !0;
 			break;