From patchwork Tue Oct 2 07:32:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 10623135 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3785015A7 for ; Tue, 2 Oct 2018 07:32:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FA8428756 for ; Tue, 2 Oct 2018 07:32:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 202E928758; Tue, 2 Oct 2018 07:32:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2FF128756 for ; Tue, 2 Oct 2018 07:32:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726836AbeJBOOS (ORCPT ); Tue, 2 Oct 2018 10:14:18 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:46467 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726814AbeJBOOS (ORCPT ); Tue, 2 Oct 2018 10:14:18 -0400 Received: by mail-lj1-f195.google.com with SMTP id 203-v6so801703ljj.13; Tue, 02 Oct 2018 00:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0xt3dmmL2vF+yL6QeZS4w6KrzNFaw1J26hKwwcqzdAE=; b=bO1Y8vQ0jkvvKkL6+18x87QcPCcEFJSE7UcfS0XeZFHFmR9NJOA7GHNhrMe07SRXDf wHF+ACcDLEbVnS/bWrer8LRNCVjmxh5scSCK6/ATtb/5gPF84lHlrLBOvXbnevSimMuD YKp0JU1PPFdGFNLfjdNpYz2NCmicj61TwgP0kGSbJ6rrVZiXwuQGIrhAfKpt5dVEN5wY ty8psr0LaFcjCO1rxgBBL/OHB3m/kqG0yjAMD8cCNZNaUp435m+loU87IBbNQbaRNMLO gRox7nxdjoXIfoGqagoRcdun6jm5VzWu9fuSRx96xo2OeUrhUpRZG+K56aD6fhfTFSTn OJ8g== 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:mime-version :content-transfer-encoding; bh=0xt3dmmL2vF+yL6QeZS4w6KrzNFaw1J26hKwwcqzdAE=; b=TGJvT39FKemMKXoUc3l53hpE/EmF5poPlFEJmKDojDaei/BrW9PHGLLwyVmy0rhh1y YbGrbT/Yq852zzUIusRixUa4D/2cwAZyXoDGODI1GO7w+kHdLriLS7LX6ZltpQpajOw+ xte3ngBQ1Sf83LgfCCtpgQMuPq/WQSXR9T/hkBm9n+gyTAiqh7q3abBCTwwdCktnp+vl BunY+PD+PS/T5Cxhz0JCE73Bd4jLZpo6YRP4Mwpu6OM2VOD+QzirzMf7/u5OBMhMFhDG ZH/0O/jyR7RXPDiGPRZE31xVvItdwwZnxm4GpndzThzZtVIZllKYQN8JkuO7+d6TgdHY No7w== X-Gm-Message-State: ABuFfog9rrTauI4E/p4T8pkuBSxB4h4VMg6CdH7zoBHl5wRxzpKqOml0 ixKVjbDAgMX605y7+b1fU48= X-Google-Smtp-Source: ACcGV612V8MilinU2/QxQnLMBupIEvG4x9ytesgYW4TR4jb5IHE1zHojgFddBhj76Ow0Z7a1ay6LSw== X-Received: by 2002:a2e:44d0:: with SMTP id b77-v6mr8413384ljf.47.1538465545093; Tue, 02 Oct 2018 00:32:25 -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 d17-v6sm1242246lfj.9.2018.10.02.00.32.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 00:32:24 -0700 (PDT) From: Ricardo Ribalda Delgado To: Pavel Machek , Sakari Ailus , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Verkuil , Laurent Pinchart Cc: Ricardo Ribalda Delgado Subject: [PATCH v5 1/6] [media] ad5820: Define entity function Date: Tue, 2 Oct 2018 09:32:17 +0200 Message-Id: <20181002073222.11368-1-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 907323f0ca3b..22759aaa2dba 100644 --- a/drivers/media/i2c/ad5820.c +++ b/drivers/media/i2c/ad5820.c @@ -317,6 +317,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);