From patchwork Mon Oct 7 13:28:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 11177513 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 864CB1599 for ; Mon, 7 Oct 2019 13:29:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C06C21D56 for ; Mon, 7 Oct 2019 13:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570454972; bh=vdbVNKK2cjLjt0uI5e0Df8suBVPHqSbN68ZVOy8d0WA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=u9Cu5Ic6DV9Wi4Czqb5BWwFrnhVqXNyR3qMmhqgDfJadxNOlCNJcWm+CVhRJcPw2h GIWePev9g3PEZPM3+2cCKOBnmuuOrY9vbh6TmQlGY8eePJwNkFX0zLpaoRPyGIgCXr YOH0uez5jq8TW84eC6Sl6fzMhCdSJm4QIyOnn6ew= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728252AbfJGN3F (ORCPT ); Mon, 7 Oct 2019 09:29:05 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:37107 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728111AbfJGN3E (ORCPT ); Mon, 7 Oct 2019 09:29:04 -0400 Received: by mail-lj1-f193.google.com with SMTP id l21so13664584lje.4; Mon, 07 Oct 2019 06:29:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B0ycQG3+LMWmEUo25NF7us/Cn/ZyGvcKYuOKAcoY2Nw=; b=ih8RvjSSN0e1gfuk9UFGxwtCPxmDxUUKXDR2j7kgAAXRMu4wgyGKseslzjlGxF0wnT WwiJnrNiatMEKK3fSmGpPg9jBY1snDSVhvdV42HvqvlypytByGBtbFSh2EO4P31k/tb2 K/urQXA3yGwM5/V9hcoFtwF1WfkhGL8LPPifu6/5Ez6EnhGiMUFO/rRpG3GFh1xY7sqJ rgWCfmjMEiPthf0g3GM/5GyjYiumyFzPYIIUOt8pt6TMon6DibQbPek6IWiSkCiqgpoF fiJ5eMkhGNtUH6FA9Vl3TcpgvrfMY+M9IEnRsR35ea8/OO7Nn3LXBDng52zcQV/c36h0 xQ/A== X-Gm-Message-State: APjAAAVLXZKCI2BC5D50FfJevqxIKCCBi4O8S0Xu6js28BxpbtUR8rP8 VByyp4U02VdzbIB/2y+oHAg= X-Google-Smtp-Source: APXvYqwYE/qHSZrjxd+iO9pBzFs9U39Vypyg0q0Zx4khhNEmjEkbb3i4WAdrYnHnIE40X3FEVKiN4w== X-Received: by 2002:a2e:5b9a:: with SMTP id m26mr15272472lje.90.1570454942468; Mon, 07 Oct 2019 06:29:02 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id f22sm2702245lfk.56.2019.10.07.06.29.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 06:29:01 -0700 (PDT) From: Ricardo Ribalda Delgado To: Pavel Machek , Sakari Ailus , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado , Laurent Pinchart Subject: [PATCH v8 1/6] media: ad5820: Define entity function Date: Mon, 7 Oct 2019 15:28:51 +0200 Message-Id: <20191007132856.27948-2-ribalda@kernel.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191007132856.27948-1-ribalda@kernel.org> References: <20191007132856.27948-1-ribalda@kernel.org> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Without this patch, media_device_register_entity throws a warning: dev_warn(mdev->dev, "Entity type for entity %s was not initialized!\n", entity->name); Signed-off-by: Ricardo Ribalda Delgado Acked-by: Pavel Machek Reviewed-by: Laurent Pinchart --- drivers/media/i2c/ad5820.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c index 925c171e7797..7a49651f4d1f 100644 --- a/drivers/media/i2c/ad5820.c +++ b/drivers/media/i2c/ad5820.c @@ -309,6 +309,7 @@ static int ad5820_probe(struct i2c_client *client, v4l2_i2c_subdev_init(&coil->subdev, client, &ad5820_ops); coil->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; coil->subdev.internal_ops = &ad5820_internal_ops; + coil->subdev.entity.function = MEDIA_ENT_F_LENS; strscpy(coil->subdev.name, "ad5820 focus", sizeof(coil->subdev.name)); ret = media_entity_pads_init(&coil->subdev.entity, 0, NULL);