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: 13451741 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3747CC4332F for ; Thu, 9 Nov 2023 21:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CoWBitz2MjbZvMVFM0ZEUyOeaSC1AyrWgZZlJ2bjB+E=; b=Uclb1WUITV1TFX RN4ShZbOLgeuEv8Pob70XKfyCBDyA8n2wDKCg3/lGD5jJVjFCQbX7I3X6NUWi2h9bZc//flM0TGyj X2kxXktnlc5w1pUFvIuSnqn5l4tzcMT0aUocZimXroiygX6UReDFDD2ax95ykCWS59ow1D8BQnLhb MIzWeD7vYeMVG/Xvjvty2E4X57i2BeMP1keWXJjr28UMfEGUFAy0TZNgSvt45Tcn1+nRBojfBxB2S fybvYLxEmyJ02tyQrcq2k3cQQGkjPpnuuH8zpFCl5qXdjzEXvun/F4gRgz7Enq0kWKf8Cd1+iAl4m vfUiei/toBQgJ6LjEQqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r1CBt-007Dl9-1d; Thu, 09 Nov 2023 21:03:53 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r1CBj-007DcC-0b; Thu, 09 Nov 2023 21:03:44 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231109_130343_371704_11D8EE94 X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 *