From nobody Mon Nov 25 04:41:10 2024 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D0D120B1E0; Tue, 29 Oct 2024 22:56:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730242604; cv=none; b=R71Bqd1mbzFqx/DkAwjJamQmaWF7OG5No0MSB70N9DXMPxUM0beqCG70LbaCDjLEUlNSoVe85KBcfMS1h2h+IQodh4+i3AYbu9cdnLEZVSneU4EzsUfgFm8DbumiUQbAkfMVWH5tORmheZJlzrSX/YzlcGUE9DsZs63vKwNRR0Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730242604; c=relaxed/simple; bh=holUwdZfjY4UeX6D5df8ESCw5JgliwDXxFm9n4+96vM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BVYIoenL274bxfF+f4OaRWxG1lyR4SUM6EPTaBgRp4qNnNL6J8e1kqAFYoEXf2tmZUu4vVezcFBweCbYxlebyAmQvwu9JYvUoFfGSrMgrRokutlhleR1En9pXywYKGzdu9AQnPG8jApJjPUzhgMyI6GIiLDAWwAGUe7kt7l0mdU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Z4OAqGxU; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z4OAqGxU" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-37d55f0cf85so4367619f8f.3; Tue, 29 Oct 2024 15:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730242598; x=1730847398; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ds5hmSlvds8wfamXPO6PwtiXp1C+nr7XDpMTSfQKTmg=; b=Z4OAqGxU3uXLr3ZwkTtxEp0jgO79+sTgiwgkXyXkvsyiIab7joRsBBKtP7M1ePKjsd CeQiOn9DTlVoBFEVSfkCrgcVLvezWiSi75nlKe7kJ3LLuMpR2Fb8H4xQRLzFl1toWMzs 8iC0aRqcOWxAsz0BeoybxCqLDAhgVWetcF+xM/qPE6zHEbivvs013MONs3RlPcXUC+qT Kr/VXHoRZ97kgOrggboLZ6abcu2HPtnFmatyttVyHTlIQQJnAkm9YVGUWg23Fm9ugJOA bbz/FzPwvme/vYy7VVuisOxsoZr4VPNeKZ8Wgbw6wdQvRrlb9Exyz5zkO7eT55JE8hGF E6MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730242598; x=1730847398; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ds5hmSlvds8wfamXPO6PwtiXp1C+nr7XDpMTSfQKTmg=; b=LGrNz1EBsnZAb0KraiAlsbWbSK6o/QdsEH8jt1X8qRyFKUkawWCEoU/A+RffblzbLC tCbfGloHgZ+vnJnBHsA9S0UAzNxlsqcsQDmWuUOeOtyt7dqjCqgttLeIrOJixg41UiHG mMyX8E90tI2hWtwcVwuaRHQF4kFe9I2illnyCeLZWWS3YemNZXdIl3yg4EYCTyvsGaxu HvonZR8I60XUDEZU5/wv6P9wn3uVgQl/8Z9IlX3P4WObIuF79RbLFfwGFT0e4l1XaQm7 kOMXUnBg9Ri+qHPMLwoEJd8rvUl53Gc5ZOysS6rNXA80aKz0dR4cOKWL2bqOWTRQ1uJi lDhQ== X-Forwarded-Encrypted: i=1; AJvYcCWFCokqAT1B5HvY820mdm9vthDT0mzT4tS1kDPvGC6AirDbnFDlTbEW677pZ7/G17bD+U8RNhrpyVedP84=@vger.kernel.org, AJvYcCX+NjHHVS9W/CFScQjEqkElekadHQcALMVzNyeAtDD65aYrCM8/QUHeGSLe6PjPAzStoh6/66MVAVepgI0=@vger.kernel.org X-Gm-Message-State: AOJu0YxppuR9TFGGKzKVAyMnxJWzeecOuToRScAnuzr1n8NZyAjmCK6B s7i/qxMnna9gyZEg5blAT+xPeZDo8tHGHE3G54QBVEPL77Qi6o27 X-Google-Smtp-Source: AGHT+IF4puEuMDDsokzEUVdG4PM6oFdsw2JMN64KahrIvvDwf7Q9cssQQgjb+zoD2Rs1A0FCgw6hCA== X-Received: by 2002:adf:cb0c:0:b0:37d:4ebe:1650 with SMTP id ffacd0b85a97d-38061200b50mr8853110f8f.46.1730242598216; Tue, 29 Oct 2024 15:56:38 -0700 (PDT) Received: from tom-desktop.station (net-188-217-53-167.cust.vodafonedsl.it. [188.217.53.167]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd9ca704sm2737165e9.41.2024.10.29.15.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 15:56:37 -0700 (PDT) From: Tommaso Merciai To: Cc: sakari.ailus@linux.intel.com, laurent.pinchart@ideasonboard.com, Tommaso Merciai , Martin Hecht , Mauro Carvalho Chehab , Tomi Valkeinen , Sebastian Reichel , Zhi Mao , Alain Volmat , Dave Stevenson , Kieran Bingham , Umang Jain , Manivannan Sadhasivam , Julien Massot , Bingbu Cao , Jacopo Mondi , Nicholas Roth , Paul Elder , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] media: i2c: Drop HAS_EVENTS and event handlers Date: Tue, 29 Oct 2024 23:56:30 +0100 Message-Id: <20241029225632.3019083-2-tomm.merciai@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029225632.3019083-1-tomm.merciai@gmail.com> References: <20241029225632.3019083-1-tomm.merciai@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" v4l2_subdev_init_finalize() already sets the HAS_EVENTS flag if a control handler is set, and subdev_do_ioctl() uses v4l2_ctrl_subdev_subscribe_event() and v4l2_event_subdev_unsubscribe() as defaults if the subdev doesn't have .(un)subscribe. Let's drop the HAS_EVENTS flag and event handlers. Signed-off-by: Tommaso Merciai Reviewed-by: Laurent Pinchart --- Changes since v1: - Rebased tree to avoid fuzz on alvium-csi2.c drv as suggested by SAilus - Fixed commit msg as suggested by LPinchart drivers/media/i2c/alvium-csi2.c | 5 +---- drivers/media/i2c/ds90ub953.c | 5 +---- drivers/media/i2c/ds90ub960.c | 5 +---- drivers/media/i2c/gc0308.c | 4 ---- drivers/media/i2c/gc05a2.c | 10 +--------- drivers/media/i2c/gc08a3.c | 10 +--------- drivers/media/i2c/gc2145.c | 10 +--------- drivers/media/i2c/imx219.c | 10 +--------- drivers/media/i2c/imx283.c | 10 +--------- drivers/media/i2c/imx290.c | 10 +--------- drivers/media/i2c/max96714.c | 6 +----- drivers/media/i2c/max96717.c | 6 +----- drivers/media/i2c/ov01a10.c | 6 +----- drivers/media/i2c/ov64a40.c | 10 +--------- drivers/media/i2c/ov8858.c | 9 +-------- drivers/media/i2c/thp7312.c | 5 +---- 16 files changed, 15 insertions(+), 106 deletions(-) diff --git a/drivers/media/i2c/alvium-csi2.c b/drivers/media/i2c/alvium-csi= 2.c index 5ddfd3dcb188..05b708bd0a64 100644 --- a/drivers/media/i2c/alvium-csi2.c +++ b/drivers/media/i2c/alvium-csi2.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include =20 @@ -2240,8 +2239,6 @@ static int alvium_ctrl_init(struct alvium_dev *alvium) =20 static const struct v4l2_subdev_core_ops alvium_core_ops =3D { .log_status =3D v4l2_ctrl_subdev_log_status, - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, }; =20 static const struct v4l2_subdev_video_ops alvium_video_ops =3D { @@ -2289,7 +2286,7 @@ static int alvium_subdev_init(struct alvium_dev *alvi= um) v4l2_i2c_subdev_init(sd, client, &alvium_subdev_ops); =20 sd->internal_ops =3D &alvium_internal_ops; - sd->flags |=3D V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE; + sd->flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; alvium->pad.flags =3D MEDIA_PAD_FL_SOURCE; sd->entity.function =3D MEDIA_ENT_F_CAM_SENSOR; =20 diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c index 16f88db14981..8b028a84f5bc 100644 --- a/drivers/media/i2c/ds90ub953.c +++ b/drivers/media/i2c/ds90ub953.c @@ -24,7 +24,6 @@ =20 #include #include -#include #include #include #include @@ -717,8 +716,6 @@ static const struct v4l2_subdev_pad_ops ub953_pad_ops = =3D { =20 static const struct v4l2_subdev_core_ops ub953_subdev_core_ops =3D { .log_status =3D ub953_log_status, - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, }; =20 static const struct v4l2_subdev_ops ub953_subdev_ops =3D { @@ -1246,7 +1243,7 @@ static int ub953_subdev_init(struct ub953_data *priv) priv->sd.internal_ops =3D &ub953_internal_ops; =20 priv->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_STREAMS; + V4L2_SUBDEV_FL_STREAMS; priv->sd.entity.function =3D MEDIA_ENT_F_VID_IF_BRIDGE; priv->sd.entity.ops =3D &ub953_entity_ops; =20 diff --git a/drivers/media/i2c/ds90ub960.c b/drivers/media/i2c/ds90ub960.c index 58424d8f72af..33f362a00875 100644 --- a/drivers/media/i2c/ds90ub960.c +++ b/drivers/media/i2c/ds90ub960.c @@ -48,7 +48,6 @@ #include #include #include -#include #include #include =20 @@ -3085,8 +3084,6 @@ static int ub960_log_status(struct v4l2_subdev *sd) =20 static const struct v4l2_subdev_core_ops ub960_subdev_core_ops =3D { .log_status =3D ub960_log_status, - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, }; =20 static const struct v4l2_subdev_internal_ops ub960_internal_ops =3D { @@ -3667,7 +3664,7 @@ static int ub960_create_subdev(struct ub960_data *pri= v) } =20 priv->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_STREAMS; + V4L2_SUBDEV_FL_STREAMS; priv->sd.entity.function =3D MEDIA_ENT_F_VID_IF_BRIDGE; priv->sd.entity.ops =3D &ub960_entity_ops; =20 diff --git a/drivers/media/i2c/gc0308.c b/drivers/media/i2c/gc0308.c index fa754a8a39a6..069f42785b3c 100644 --- a/drivers/media/i2c/gc0308.c +++ b/drivers/media/i2c/gc0308.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include =20 @@ -987,8 +986,6 @@ static const struct v4l2_ctrl_ops gc0308_ctrl_ops =3D { =20 static const struct v4l2_subdev_core_ops gc0308_core_ops =3D { .log_status =3D v4l2_ctrl_subdev_log_status, - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, #ifdef CONFIG_VIDEO_ADV_DEBUG .g_register =3D gc0308_g_register, .s_register =3D gc0308_s_register, @@ -1338,7 +1335,6 @@ static int gc0308_probe(struct i2c_client *client) v4l2_i2c_subdev_init(&gc0308->sd, client, &gc0308_subdev_ops); gc0308->sd.internal_ops =3D &gc0308_internal_ops; gc0308->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; - gc0308->sd.flags |=3D V4L2_SUBDEV_FL_HAS_EVENTS; =20 ret =3D gc0308_init_controls(gc0308); if (ret) diff --git a/drivers/media/i2c/gc05a2.c b/drivers/media/i2c/gc05a2.c index 0413c557e594..3f7f3d5abeeb 100644 --- a/drivers/media/i2c/gc05a2.c +++ b/drivers/media/i2c/gc05a2.c @@ -24,7 +24,6 @@ =20 #include #include -#include #include #include =20 @@ -1059,13 +1058,7 @@ static const struct v4l2_subdev_pad_ops gc05a2_subde= v_pad_ops =3D { .get_selection =3D gc05a2_get_selection, }; =20 -static const struct v4l2_subdev_core_ops gc05a2_core_ops =3D { - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, -}; - static const struct v4l2_subdev_ops gc05a2_subdev_ops =3D { - .core =3D &gc05a2_core_ops, .video =3D &gc05a2_video_ops, .pad =3D &gc05a2_subdev_pad_ops, }; @@ -1271,8 +1264,7 @@ static int gc05a2_probe(struct i2c_client *client) return dev_err_probe(dev, ret, "failed to init controls\n"); =20 - gc05a2->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS; + gc05a2->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; gc05a2->pad.flags =3D MEDIA_PAD_FL_SOURCE; gc05a2->sd.dev =3D &client->dev; gc05a2->sd.entity.function =3D MEDIA_ENT_F_CAM_SENSOR; diff --git a/drivers/media/i2c/gc08a3.c b/drivers/media/i2c/gc08a3.c index 84de5cff958d..938709a677b6 100644 --- a/drivers/media/i2c/gc08a3.c +++ b/drivers/media/i2c/gc08a3.c @@ -24,7 +24,6 @@ =20 #include #include -#include #include #include =20 @@ -1001,13 +1000,7 @@ static const struct v4l2_subdev_pad_ops gc08a3_subde= v_pad_ops =3D { .get_selection =3D gc08a3_get_selection, }; =20 -static const struct v4l2_subdev_core_ops gc08a3_core_ops =3D { - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, -}; - static const struct v4l2_subdev_ops gc08a3_subdev_ops =3D { - .core =3D &gc08a3_core_ops, .video =3D &gc08a3_video_ops, .pad =3D &gc08a3_subdev_pad_ops, }; @@ -1247,8 +1240,7 @@ static int gc08a3_probe(struct i2c_client *client) goto err_power_off; } =20 - gc08a3->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS; + gc08a3->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; gc08a3->pad.flags =3D MEDIA_PAD_FL_SOURCE; gc08a3->sd.dev =3D &client->dev; gc08a3->sd.entity.function =3D MEDIA_ENT_F_CAM_SENSOR; diff --git a/drivers/media/i2c/gc2145.c b/drivers/media/i2c/gc2145.c index 667bb756d056..03d78fbe8634 100644 --- a/drivers/media/i2c/gc2145.c +++ b/drivers/media/i2c/gc2145.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include =20 @@ -1123,11 +1122,6 @@ static const u8 test_pattern_val[] =3D { GC2145_TEST_UNIFORM | GC2145_TEST_BLACK, }; =20 -static const struct v4l2_subdev_core_ops gc2145_core_ops =3D { - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, -}; - static const struct v4l2_subdev_video_ops gc2145_video_ops =3D { .s_stream =3D gc2145_set_stream, }; @@ -1141,7 +1135,6 @@ static const struct v4l2_subdev_pad_ops gc2145_pad_op= s =3D { }; =20 static const struct v4l2_subdev_ops gc2145_subdev_ops =3D { - .core =3D &gc2145_core_ops, .video =3D &gc2145_video_ops, .pad =3D &gc2145_pad_ops, }; @@ -1407,8 +1400,7 @@ static int gc2145_probe(struct i2c_client *client) goto error_power_off; =20 /* Initialize subdev */ - gc2145->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS; + gc2145->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; gc2145->sd.entity.function =3D MEDIA_ENT_F_CAM_SENSOR; =20 /* Initialize source pad */ diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c index e78a80b2bb2e..2d54cea113e1 100644 --- a/drivers/media/i2c/imx219.c +++ b/drivers/media/i2c/imx219.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include =20 @@ -922,11 +921,6 @@ static int imx219_init_state(struct v4l2_subdev *sd, return 0; } =20 -static const struct v4l2_subdev_core_ops imx219_core_ops =3D { - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, -}; - static const struct v4l2_subdev_video_ops imx219_video_ops =3D { .s_stream =3D imx219_set_stream, }; @@ -940,7 +934,6 @@ static const struct v4l2_subdev_pad_ops imx219_pad_ops = =3D { }; =20 static const struct v4l2_subdev_ops imx219_subdev_ops =3D { - .core =3D &imx219_core_ops, .video =3D &imx219_video_ops, .pad =3D &imx219_pad_ops, }; @@ -1166,8 +1159,7 @@ static int imx219_probe(struct i2c_client *client) goto error_power_off; =20 /* Initialize subdev */ - imx219->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS; + imx219->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; imx219->sd.entity.function =3D MEDIA_ENT_F_CAM_SENSOR; =20 /* Initialize source pad */ diff --git a/drivers/media/i2c/imx283.c b/drivers/media/i2c/imx283.c index 94276f4f2d83..f676faf4b301 100644 --- a/drivers/media/i2c/imx283.c +++ b/drivers/media/i2c/imx283.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include =20 @@ -1284,11 +1283,6 @@ static int imx283_get_selection(struct v4l2_subdev *= sd, } } =20 -static const struct v4l2_subdev_core_ops imx283_core_ops =3D { - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, -}; - static const struct v4l2_subdev_video_ops imx283_video_ops =3D { .s_stream =3D v4l2_subdev_s_stream_helper, }; @@ -1308,7 +1302,6 @@ static const struct v4l2_subdev_internal_ops imx283_i= nternal_ops =3D { }; =20 static const struct v4l2_subdev_ops imx283_subdev_ops =3D { - .core =3D &imx283_core_ops, .video =3D &imx283_video_ops, .pad =3D &imx283_pad_ops, }; @@ -1548,8 +1541,7 @@ static int imx283_probe(struct i2c_client *client) goto error_pm; =20 /* Initialize subdev */ - imx283->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS; + imx283->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; imx283->sd.entity.function =3D MEDIA_ENT_F_CAM_SENSOR; imx283->sd.internal_ops =3D &imx283_internal_ops; =20 diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c index 49a5bf9c17da..ee698c99001d 100644 --- a/drivers/media/i2c/imx290.c +++ b/drivers/media/i2c/imx290.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include =20 @@ -1210,11 +1209,6 @@ static int imx290_entity_init_state(struct v4l2_subd= ev *subdev, return 0; } =20 -static const struct v4l2_subdev_core_ops imx290_core_ops =3D { - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, -}; - static const struct v4l2_subdev_video_ops imx290_video_ops =3D { .s_stream =3D imx290_set_stream, }; @@ -1228,7 +1222,6 @@ static const struct v4l2_subdev_pad_ops imx290_pad_op= s =3D { }; =20 static const struct v4l2_subdev_ops imx290_subdev_ops =3D { - .core =3D &imx290_core_ops, .video =3D &imx290_video_ops, .pad =3D &imx290_pad_ops, }; @@ -1262,8 +1255,7 @@ static int imx290_subdev_init(struct imx290 *imx290) pm_runtime_put_autosuspend(imx290->dev); =20 imx290->sd.internal_ops =3D &imx290_internal_ops; - imx290->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS; + imx290->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; imx290->sd.entity.ops =3D &imx290_subdev_entity_ops; imx290->sd.entity.function =3D MEDIA_ENT_F_CAM_SENSOR; =20 diff --git a/drivers/media/i2c/max96714.c b/drivers/media/i2c/max96714.c index 2257b6b807ea..159753b13777 100644 --- a/drivers/media/i2c/max96714.c +++ b/drivers/media/i2c/max96714.c @@ -17,7 +17,6 @@ =20 #include #include -#include #include #include =20 @@ -489,8 +488,6 @@ static int max96714_log_status(struct v4l2_subdev *sd) =20 static const struct v4l2_subdev_core_ops max96714_subdev_core_ops =3D { .log_status =3D max96714_log_status, - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, }; =20 static const struct v4l2_subdev_video_ops max96714_video_ops =3D { @@ -605,8 +602,7 @@ static int max96714_create_subdev(struct max96714_priv = *priv) goto err_free_ctrl; } =20 - priv->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_STREAMS; + priv->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS; priv->sd.entity.function =3D MEDIA_ENT_F_VID_IF_BRIDGE; priv->sd.entity.ops =3D &max96714_entity_ops; =20 diff --git a/drivers/media/i2c/max96717.c b/drivers/media/i2c/max96717.c index 047bad30e263..9259d58ba734 100644 --- a/drivers/media/i2c/max96717.c +++ b/drivers/media/i2c/max96717.c @@ -17,7 +17,6 @@ =20 #include #include -#include #include #include =20 @@ -577,8 +576,6 @@ static const struct v4l2_subdev_pad_ops max96717_pad_op= s =3D { =20 static const struct v4l2_subdev_core_ops max96717_subdev_core_ops =3D { .log_status =3D max96717_log_status, - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, }; =20 static const struct v4l2_subdev_internal_ops max96717_internal_ops =3D { @@ -692,8 +689,7 @@ static int max96717_subdev_init(struct max96717_priv *p= riv) goto err_free_ctrl; } =20 - priv->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_STREAMS; + priv->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS; priv->sd.entity.function =3D MEDIA_ENT_F_VID_IF_BRIDGE; priv->sd.entity.ops =3D &max96717_entity_ops; =20 diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c index 5606437f37d0..a608cb51ac6e 100644 --- a/drivers/media/i2c/ov01a10.c +++ b/drivers/media/i2c/ov01a10.c @@ -13,7 +13,6 @@ =20 #include #include -#include #include =20 #define OV01A10_LINK_FREQ_400MHZ 400000000ULL @@ -804,8 +803,6 @@ static int ov01a10_get_selection(struct v4l2_subdev *sd, =20 static const struct v4l2_subdev_core_ops ov01a10_core_ops =3D { .log_status =3D v4l2_ctrl_subdev_log_status, - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, }; =20 static const struct v4l2_subdev_video_ops ov01a10_video_ops =3D { @@ -892,8 +889,7 @@ static int ov01a10_probe(struct i2c_client *client) } =20 ov01a10->sd.state_lock =3D ov01a10->ctrl_handler.lock; - ov01a10->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS; + ov01a10->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; ov01a10->sd.entity.ops =3D &ov01a10_subdev_entity_ops; ov01a10->sd.entity.function =3D MEDIA_ENT_F_CAM_SENSOR; ov01a10->pad.flags =3D MEDIA_PAD_FL_SOURCE; diff --git a/drivers/media/i2c/ov64a40.c b/drivers/media/i2c/ov64a40.c index 541bf74581d2..a5da4fe47e0b 100644 --- a/drivers/media/i2c/ov64a40.c +++ b/drivers/media/i2c/ov64a40.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -3200,13 +3199,7 @@ static const struct v4l2_subdev_pad_ops ov64a40_pad_= ops =3D { .get_selection =3D ov64a40_get_selection, }; =20 -static const struct v4l2_subdev_core_ops ov64a40_core_ops =3D { - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, -}; - static const struct v4l2_subdev_ops ov64a40_subdev_ops =3D { - .core =3D &ov64a40_core_ops, .video =3D &ov64a40_video_ops, .pad =3D &ov64a40_pad_ops, }; @@ -3605,8 +3598,7 @@ static int ov64a40_probe(struct i2c_client *client) =20 /* Initialize subdev */ ov64a40->sd.internal_ops =3D &ov64a40_internal_ops; - ov64a40->sd.flags =3D V4L2_SUBDEV_FL_HAS_DEVNODE - | V4L2_SUBDEV_FL_HAS_EVENTS; + ov64a40->sd.flags =3D V4L2_SUBDEV_FL_HAS_DEVNODE; ov64a40->sd.entity.function =3D MEDIA_ENT_F_CAM_SENSOR; =20 ov64a40->pad.flags =3D MEDIA_PAD_FL_SOURCE; diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c index 174c65f76886..7dcb235d2056 100644 --- a/drivers/media/i2c/ov8858.c +++ b/drivers/media/i2c/ov8858.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -1500,13 +1499,7 @@ static const struct v4l2_subdev_pad_ops ov8858_pad_o= ps =3D { .set_fmt =3D ov8858_set_fmt, }; =20 -static const struct v4l2_subdev_core_ops ov8858_core_ops =3D { - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, -}; - static const struct v4l2_subdev_ops ov8858_subdev_ops =3D { - .core =3D &ov8858_core_ops, .video =3D &ov8858_video_ops, .pad =3D &ov8858_pad_ops, }; @@ -1917,7 +1910,7 @@ static int ov8858_probe(struct i2c_client *client) return ret; =20 sd =3D &ov8858->subdev; - sd->flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; + sd->flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; ov8858->pad.flags =3D MEDIA_PAD_FL_SOURCE; sd->entity.function =3D MEDIA_ENT_F_CAM_SENSOR; ret =3D media_entity_pads_init(&sd->entity, 1, &ov8858->pad); diff --git a/drivers/media/i2c/thp7312.c b/drivers/media/i2c/thp7312.c index 75225ff5eff6..e2679601a301 100644 --- a/drivers/media/i2c/thp7312.c +++ b/drivers/media/i2c/thp7312.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include =20 @@ -879,8 +878,6 @@ static int thp7312_init_state(struct v4l2_subdev *sd, =20 static const struct v4l2_subdev_core_ops thp7312_core_ops =3D { .log_status =3D v4l2_ctrl_subdev_log_status, - .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, - .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, }; =20 static const struct v4l2_subdev_video_ops thp7312_video_ops =3D { @@ -2127,7 +2124,7 @@ static int thp7312_probe(struct i2c_client *client) =20 v4l2_i2c_subdev_init(&thp7312->sd, client, &thp7312_subdev_ops); thp7312->sd.internal_ops =3D &thp7312_internal_ops; - thp7312->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EV= ENTS; + thp7312->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; thp7312->pad.flags =3D MEDIA_PAD_FL_SOURCE; thp7312->sd.entity.function =3D MEDIA_ENT_F_CAM_SENSOR; =20 --=20 2.34.1 From nobody Mon Nov 25 04:41:10 2024 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C7D2194AD6; Tue, 29 Oct 2024 22:56:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730242605; cv=none; b=JZ2yXt4B9EuNnO/fWcDnEciPM9Z/SwXj0CyV8Y3cyU7KtWWCFHSPSZYUAhCSiddEOg2hcKhJBByuExR4ctdx42hXwbIqL+nOW55coe45ag4cx+JgN+PKBO9Njt+IWemM7RMEplxx/I5I/tG1zSYbJG7As9BK3jr3YscqScmE29c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730242605; c=relaxed/simple; bh=Do7/gJ5lnF1cUV3K69wJKZy+HbKjdSFW/xsvhvXP67s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SyP/ZagQRnLQlF8ihHXFQyOHnf4KTAZjMnEDzk+ES0bjJTJLzLJbUaMBYGBz4WFYvdOf70+JC8L0Fp6lrZdtOuWGJR66yn1Hqon+QjxALzzPwhm/JV7QjtDQtxeRiFwoil48ux+L43qBWHdq7IyQSrpXq04y8wgGSWoFJvgfvuc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UBXzZXgt; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UBXzZXgt" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-37d4ac91d97so4933691f8f.2; Tue, 29 Oct 2024 15:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730242602; x=1730847402; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JMNSzz/+xIf/XTvjrA4Umyy1PvtZ6Wltbg3fAKTOUc0=; b=UBXzZXgt1+jsv7r0uT5HJo3F82fOdNWEw3147H8hVgU68cglNIcghz9NJkHSv8FbSm 6ZrAjXLYfqw3uaSGDSyQF3Y6QVh47MuThdp95DLO1oa2kxm6FGhTQX6KuwlMOgokhL/N XSGtg9XCFH6E0L2lKaY0MyjAm1ZZiPnI1VyGhswGkmhO3jnhRkn41dVJzB2bt0uMaCZT fPIVBa7w9ESlxUpiHHotnfNXwGgHKnxYEG2PMxqNOoBqN/chajrKV+67Fmz2Vini5QsT xWxJOWFG5/rkpNh+Rdi/qm3tzK0lsIqL8PeCHs6dFxZYdxc38zprpwtrE1KccOoTv6lO /r+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730242602; x=1730847402; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JMNSzz/+xIf/XTvjrA4Umyy1PvtZ6Wltbg3fAKTOUc0=; b=HVqh2KMb/whg1b3IFGp62w7i4nsN9CbZsrIcJ3jbO2SW53rFlKiW4I5YptlT1rFOy/ OF0jgyVmQCONLklPR7TFGwjX6fEEqX69/cSrFW/cclGWfJK6JlSe8j+GPb06XS3r8RgN xXZWiXzKYk117reTx8G+NIncUXPPURxvlH4I3W1L890bjmGQZt6LbFzFkyBWLq93vjk+ 0GiP1Qfdn9G6bz3wV3KGAz2nkmNFeuPwB9hh0gX81QW9WtDXymJlTrdmYcmZ/3c6H7VR sWTxljtT0UWCDBtOTLYeEPi++6bsuaHChQXkXpLFw0RQuX2VVsGBBNZOxfGQqWxOXHR4 M9Eg== X-Forwarded-Encrypted: i=1; AJvYcCW6olJe+V4uvEAWQmgaiV1BeToBADK9b9+WnDEgsSyg2gegSIIW59SGQ/R6vMMjnu7GQqvlSx9zo23dnPE=@vger.kernel.org, AJvYcCX1RZtqSPsUIliM0LLIyKmZW4iN1RkZFVaxJVeYAbJwGF/MqIO2AlTiGzKT+2tzzPhagUfcP5k/hNSyh90=@vger.kernel.org X-Gm-Message-State: AOJu0Yz3bvQmfrtE/g3ap1hr3Yen61qWhjhXBTTcVkVHYW5Nfe/F5lNx OZ4SCMHNGZk1gjBXMJhrpHriE7FV2aCovBi/w1u2mYQwcglLgROe X-Google-Smtp-Source: AGHT+IFbLaEqqiIO1UCyulG3MXZ1wN/8kKJwWFY+rY+t3jnZ3ej/LK7/ohQOMcRGpJJNYjVIypPJlg== X-Received: by 2002:a05:6000:1942:b0:37d:43d4:88b7 with SMTP id ffacd0b85a97d-38061141a54mr13006339f8f.3.1730242601521; Tue, 29 Oct 2024 15:56:41 -0700 (PDT) Received: from tom-desktop.station (net-188-217-53-167.cust.vodafonedsl.it. [188.217.53.167]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd9ca704sm2737165e9.41.2024.10.29.15.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 15:56:41 -0700 (PDT) From: Tommaso Merciai To: Cc: sakari.ailus@linux.intel.com, laurent.pinchart@ideasonboard.com, Tommaso Merciai , Martin Hecht , Mauro Carvalho Chehab , Tomi Valkeinen , Sebastian Reichel , Zhi Mao , Alain Volmat , Dave Stevenson , Kieran Bingham , Umang Jain , Manivannan Sadhasivam , Michael Riesch , Julien Massot , Bingbu Cao , Jacopo Mondi , Nicholas Roth , Paul Elder , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] media: i2c: imx415: Drop HAS_EVENTS flag Date: Tue, 29 Oct 2024 23:56:31 +0100 Message-Id: <20241029225632.3019083-3-tomm.merciai@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029225632.3019083-1-tomm.merciai@gmail.com> References: <20241029225632.3019083-1-tomm.merciai@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" v4l2_subdev_init_finalize() already sets the HAS_EVENTS flag if a control handler is set. Let's drop the HAS_EVENTS flag. Suggested-by: Laurent Pinchart Signed-off-by: Tommaso Merciai Acked-by: Michael Riesch Reviewed-by: Laurent Pinchart --- drivers/media/i2c/imx415.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c index a20b0db330d3..3f7924aa1bd3 100644 --- a/drivers/media/i2c/imx415.c +++ b/drivers/media/i2c/imx415.c @@ -1113,8 +1113,7 @@ static int imx415_subdev_init(struct imx415 *sensor) if (ret) return ret; =20 - sensor->subdev.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | - V4L2_SUBDEV_FL_HAS_EVENTS; + sensor->subdev.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; sensor->pad.flags =3D MEDIA_PAD_FL_SOURCE; sensor->subdev.entity.function =3D MEDIA_ENT_F_CAM_SENSOR; ret =3D media_entity_pads_init(&sensor->subdev.entity, 1, &sensor->pad); --=20 2.34.1