From: Ricardo Ribalda <ribalda@chromium.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
Yunke Cao <yunkec@chromium.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Hans de Goede <hdegoede@redhat.com>,
Ricardo Ribalda <ribalda@chromium.org>
Subject: [PATCH v2 3/6] Revert "media: uvcvideo: Allow entity-defined get_info and get_cur"
Date: Fri, 08 Nov 2024 20:25:47 +0000 [thread overview]
Message-ID: <20241108-uvc-subdev-v2-3-85d8a051a3d3@chromium.org> (raw)
In-Reply-To: <20241108-uvc-subdev-v2-0-85d8a051a3d3@chromium.org>
With the privacy gpio now handled as a subdevice, there is no more need
for this.
This reverts commit 65900c581d014499f0f8ceabfc02c652e9a88771.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/usb/uvc/uvc_ctrl.c | 20 +++++---------------
drivers/media/usb/uvc/uvcvideo.h | 5 -----
2 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index b98f4778d8aa..90bc2132d8d5 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -1087,15 +1087,9 @@ static int __uvc_ctrl_load_cur(struct uvc_video_chain *chain,
return 0;
}
- if (ctrl->entity->get_cur)
- ret = ctrl->entity->get_cur(chain->dev, ctrl->entity,
- ctrl->info.selector, data,
- ctrl->info.size);
- else
- ret = uvc_query_ctrl(chain->dev, UVC_GET_CUR,
- ctrl->entity->id, chain->dev->intfnum,
- ctrl->info.selector, data,
- ctrl->info.size);
+ ret = uvc_query_ctrl(chain->dev, UVC_GET_CUR, ctrl->entity->id,
+ chain->dev->intfnum, ctrl->info.selector, data,
+ ctrl->info.size);
if (ret < 0)
return ret;
@@ -2055,12 +2049,8 @@ static int uvc_ctrl_get_flags(struct uvc_device *dev,
if (data == NULL)
return -ENOMEM;
- if (ctrl->entity->get_info)
- ret = ctrl->entity->get_info(dev, ctrl->entity,
- ctrl->info.selector, data);
- else
- ret = uvc_query_ctrl(dev, UVC_GET_INFO, ctrl->entity->id,
- dev->intfnum, info->selector, data, 1);
+ ret = uvc_query_ctrl(dev, UVC_GET_INFO, ctrl->entity->id, dev->intfnum,
+ info->selector, data, 1);
if (!ret) {
info->flags &= ~(UVC_CTRL_FLAG_GET_CUR |
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 4a06db329aa9..1eeef2c12fbe 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -244,11 +244,6 @@ struct uvc_entity {
u8 bNrInPins;
u8 *baSourceID;
- int (*get_info)(struct uvc_device *dev, struct uvc_entity *entity,
- u8 cs, u8 *caps);
- int (*get_cur)(struct uvc_device *dev, struct uvc_entity *entity,
- u8 cs, void *data, u16 size);
-
unsigned int ncontrols;
struct uvc_control *controls;
};
--
2.47.0.277.g8800431eea-goog
next prev parent reply other threads:[~2024-11-08 20:25 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 20:25 [PATCH v2 0/6] media: uvcvideo: Implement the Privacy GPIO as a subdevice Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 1/6] media: uvcvideo: Factor out gpio functions to its own file Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 2/6] media: uvcvideo: Re-implement privacy GPIO as a separate subdevice Ricardo Ribalda
2024-11-08 20:25 ` Ricardo Ribalda [this message]
2024-11-08 20:25 ` [PATCH v2 4/6] media: uvcvideo: Create ancillary link for GPIO subdevice Ricardo Ribalda
2024-11-10 10:05 ` Sakari Ailus
2024-11-08 20:25 ` [PATCH v2 5/6] media: v4l2-core: Add new MEDIA_ENT_F_GPIO Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 6/6] media: uvcvideo: Use MEDIA_ENT_F_GPIO for the GPIO entity Ricardo Ribalda
2024-11-09 14:04 ` [PATCH v2 0/6] media: uvcvideo: Implement the Privacy GPIO as a subdevice Mauro Carvalho Chehab
2024-11-09 14:57 ` Ricardo Ribalda
2024-11-09 15:37 ` Hans de Goede
2024-11-09 16:29 ` Ricardo Ribalda
2024-11-10 10:02 ` Mauro Carvalho Chehab
2024-11-10 10:29 ` Hans Verkuil
2024-11-10 10:37 ` Ricardo Ribalda
2024-11-10 10:47 ` Hans Verkuil
2024-11-10 12:48 ` Mauro Carvalho Chehab
2024-11-10 10:32 ` Ricardo Ribalda
2024-11-10 10:59 ` Ricardo Ribalda
2024-11-10 12:46 ` Mauro Carvalho Chehab
2024-11-10 16:01 ` Ricardo Ribalda
2024-11-10 15:14 ` Laurent Pinchart
2024-11-10 16:04 ` Ricardo Ribalda
2024-11-25 12:31 ` Hans de Goede
2024-11-25 12:56 ` Laurent Pinchart
2024-11-25 13:35 ` Hans de Goede
2024-11-10 16:07 ` Ricardo Ribalda
2024-11-25 12:39 ` Hans de Goede
2024-11-25 12:58 ` Laurent Pinchart
2024-11-25 13:44 ` Hans de Goede
2024-11-25 13:50 ` Ricardo Ribalda
2024-11-11 12:03 ` Hans de Goede
2024-11-25 12:25 ` Hans de Goede
2024-11-25 12:49 ` Laurent Pinchart
2024-11-25 13:29 ` Hans de Goede
2024-11-26 17:22 ` Laurent Pinchart
2024-11-25 13:39 ` Ricardo Ribalda
2024-11-25 14:02 ` Hans de Goede
2024-11-26 16:22 ` Ricardo Ribalda
2024-11-26 17:18 ` Laurent Pinchart
2024-11-26 17:29 ` Ricardo Ribalda
2024-11-10 15:08 ` Laurent Pinchart
2024-11-11 12:59 ` Hans de Goede
2024-11-11 14:35 ` Hans de Goede
2024-11-12 17:31 ` Ricardo Ribalda
2024-11-13 15:19 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241108-uvc-subdev-v2-3-85d8a051a3d3@chromium.org \
--to=ribalda@chromium.org \
--cc=hdegoede@redhat.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=yunkec@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox