From patchwork Thu Nov 9 21:03:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 163590 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp706028vqs; Thu, 9 Nov 2023 13:05:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYfWK7+/zrWQycvnp+ly2VfWxXh8sHN+NanNsxxOJmKfxKIgHt7lyXdyy36+528Qgyq2LK X-Received: by 2002:a05:6a00:2e81:b0:6b3:55fd:d851 with SMTP id fd1-20020a056a002e8100b006b355fdd851mr5752700pfb.10.1699563907248; Thu, 09 Nov 2023 13:05:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699563907; cv=none; d=google.com; s=arc-20160816; b=AB8ZtMzdRU5qIwkDq+hm4abLGdu442a7J8Z6A3A5BoA+VJBanYVGRbDzi2rv0dloLY bcjQZl18VCEPpGEmG/WlA3tQ8wM19RIOUaPnoIJEjfRjISDQJVN32EePW9RpkNUBmHEt Mf/NajrusigWJldQxECAeaOigB0TKjbb4uICH5BbF1zfmIi8tJPR/8VAe1PagjPTn42w bp4Dl7hNKfx400ZH0syrWOZKEBuHBrbh09GdPtzzm8LIbDFcM+ggOSOfMFTf3tOGLMHO Ve5wBqctel2q5fIPW/gy0wEz/fw3ueCjDVbVxsvCiSgpXTuc6gl/9iZrW74MwJQTkHHD yfYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lqXHapaLvM6yC7ORdOulM4Y5LvLktZxCxfSUeBsBG+c=; fh=jB4ZJnu48Rd5A9Gw+jJTxc8V04xPsHLMeRevtz00HEY=; b=rh1ldxHrMvW2Ab9tktyPOylsDsh8IHUxuPSeghjsG3QfImljz9MwZCtlLzbXknEXRx 6HJEPk5dYLbV7SPYlJP0JEpPh2PA2EWjITw+58PuSTJvzdlZnxAvcb69+2fe2VNujogh N1Ajq1UfQPqVgWYo4nYZ11cCrxzyOA2JSVzzYT9MeQjjLPu+RWmCPh7NTiPe93QLvIeA 5BdoHw5jCeNevC4hJ6LSDOtNLMgrUmhjc2AHz67IdpazVUGziyxfVxsAm1yHwf1Gn0KP iK4w8uDjFP4Ft4z6Ob6Mkto2p4Qnnvz8kHlf1gHg1DoFM3RLBdxFDr6mUzeyNTnHMqIr JBPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=BBRmhbnk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id bg26-20020a056a02011a00b005b96cbfacdesi7958972pgb.196.2023.11.09.13.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 13:05:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=BBRmhbnk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 10CB882A407A; Thu, 9 Nov 2023 13:04:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345389AbjKIVEF (ORCPT + 30 others); Thu, 9 Nov 2023 16:04:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345278AbjKIVDt (ORCPT ); Thu, 9 Nov 2023 16:03:49 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AB5246A6; Thu, 9 Nov 2023 13:03:43 -0800 (PST) Received: from umang.jain (unknown [103.251.226.64]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 864A16EF; Thu, 9 Nov 2023 22:03:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699563799; bh=Ct1dLg9BPS1fwkfzrq+nudub5VExw7iMjnLi1u6l4d8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BBRmhbnkhXIfXNz1ErJ+UkmgnE3+s//2iJ/fWt2qT1Q7FwMdBtJkOcHQAuggFcgEa VNR2XJbQ1ftZ/4cjPhSJ65k0SxEELQNom3cOUkF95DWILjq6IZJDN7P1h9REF7AxU6 aTcZA0DGdx65RM5hRInH25DDK/DaRW6B14CjWRw4= From: Umang Jain To: linux-media@vger.kernel.org, kernel-list@raspberrypi.com, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev Cc: Dave Stevenson , Kieran Bingham , Laurent Pinchart , "Ricardo B . Marliere" , Dan Carpenter , Stefan Wahren , Umang Jain Subject: [PATCH v2 09/15] staging: vc04_services: Add helpers for vchiq driver data Date: Thu, 9 Nov 2023 16:03:01 -0500 Message-ID: <20231109210309.638594-10-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231109210309.638594-1-umang.jain@ideasonboard.com> References: <20231109210309.638594-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 09 Nov 2023 13:04:42 -0800 (PST) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782121923551340496 X-GMAIL-MSGID: 1782121923551340496 Add helpers to set and get vchiq driver data. vchiq_set_drvdata() and vchiq_get_drvdata() wraps dev_set_drvdata() and dev_get_drvdata() respectively. Signed-off-by: Umang Jain --- .../vc04_services/interface/vchiq_arm/vchiq_bus.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h index caa6fdf25bb1..800f53bb48c2 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h @@ -34,6 +34,16 @@ static inline struct vchiq_driver *to_vchiq_driver(struct device_driver *d) return container_of(d, struct vchiq_driver, driver); } +static inline void *vchiq_get_drvdata(const struct vchiq_device *device) +{ + return dev_get_drvdata(&device->dev); +} + +static inline void vchiq_set_drvdata(struct vchiq_device *device, void *data) +{ + dev_set_drvdata(&device->dev, data); +} + extern struct bus_type vchiq_bus_type; struct vchiq_device *