Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1598481pxb; Fri, 20 Nov 2020 13:44:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZZtUV08f/rmew+tzoQ7C5Pw8OK8vGHa4BKIPB3niz4Vq/7ORvEI1m6gwOH/emK01Yj3hS X-Received: by 2002:aa7:c704:: with SMTP id i4mr36909621edq.51.1605908676622; Fri, 20 Nov 2020 13:44:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605908676; cv=none; d=google.com; s=arc-20160816; b=znEOz9JdJpPiA32JxiQeO+c0WKAUs+VmrJNZuSiRQURAxl3lS/EH0hhOdZ2lUYG7dk GWOzmMmfUOW0CydUtL35ZhWHJ+C6bY4OcmbJq84tVJftiFOE4iSRCJFL3wNKmVdaLxZA HGuHZdDBXIG2i8aWNk5544G1AKstMwRU+/D8uWTztcfXek6x9QEUD7hK12wHGVwiGdSd q4ezbzv/i32BU8PMMcOgbwRR5U3xoXbFfIogU6A1/KtRpU2Yfbv90lCxEL5trk5Wj2No S879sYKwQpahyYlRjB8ZavTvuIOEZxK180djGuOIDlNCryjDsW0kRYPCgO8xHzqo60qI 45VA== 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=Jz6JCYyURz+3oCPXxnAvwJDQutjB3zynS7kiUzNmMdo=; b=rUJ1eSrxP/IgfHWQaoRa99eMTZZ7Hagvh5w8i3bZH85UOWyPzaD6czxJW2wm1XyBDS lnddMtks9vZC5r7FsaKPEjKqjHWbNEaPxJprK7NysKQk+wrhckwCL7+bKpvF0p0knLsI 9W+ebSL3kApwUrrOo0SNbm9lg47QIuevpPclC9Xgxes6tt3BwtNchyEBlVCD1yAo+t0p LMPxLGcRmIAagzyFIx5HTiSl3+s7cQv4+J/LXZfm9SAWYNcYdEuOflxkBwzEXRTJxzFI x/HekXsaMky6F2H+7NWUSwvhMj5pklU0j3ckmPouuiLCbw2GbxWZaa+qAjYEIDo4Qtq6 a7JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=deptNpfm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz14si337125edb.347.2020.11.20.13.44.13; Fri, 20 Nov 2020 13:44:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=deptNpfm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728571AbgKTVmz (ORCPT + 99 others); Fri, 20 Nov 2020 16:42:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728509AbgKTVmy (ORCPT ); Fri, 20 Nov 2020 16:42:54 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F44DC061A04 for ; Fri, 20 Nov 2020 13:42:54 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id 131so9136184pfb.9 for ; Fri, 20 Nov 2020 13:42:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Jz6JCYyURz+3oCPXxnAvwJDQutjB3zynS7kiUzNmMdo=; b=deptNpfmflZwWDqDo3Id15PhX9Tird93huJPB1xqkiBorMz3shPfzHEgJjdZqZDTlh If82pWCZXM4wMn9wMLaenvqyC6JzycJ4r8O/eV9XVR0hzPgTqcT+OMxmc45lNRvuAvli 9Q2L1EbmmSHq0pxB2R5Hs5yS9BiscSj9rzYOE/+iUmYQ4kHkgIQZTsKtdUgZgx4UA6nA 091p5WQkWqK02a8XJmNzfWy4/kr9L8XBctt/ZI0HtXBx8g9As7CQ3LkBUK2eQea2xjqV m7R2mjl+o2rdao9tUbpEol1eMDn38ERrtGe+FWX1GFLy5apZxHiSvEw3FF4ZLB9OpnDA /aNg== 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=Jz6JCYyURz+3oCPXxnAvwJDQutjB3zynS7kiUzNmMdo=; b=GnNK2BtiYH4ZIJYQY12ScVqaHRJ0UV6VPFuU3yhrQJlZRv4hoJgzKHVHZIVpnA6Eyj Wl2+ReKjYME1O+iiz40QvsElAfjiXOnSknSznkzv0blitBiarMl7VjVWgszC9gnHKcRw v/paHL3MgM4Pwlt0DrszkKFKWqtzbdpL8KV1wd+tlAc0xqEOy0/HmbI7sTuj1F0qynFx dfsTN7UILoFzIUrVJR9Ib2LB/UDee7lYyeTHu84q0eDLXc3RVYdPpcIHriXCA/Durw/E 9x16rEVYIAhMjZPVO8pHkUwpE/NxchQOtzk5XrFtEoViLJCrBA4nZNQA+FRAVZOrD8l6 YCiA== X-Gm-Message-State: AOAM5307ZDoCc9qUziKVxAl9bvD8c08bdyApP3Tlzf8cxC7oFoLc+jSA JQFXvx+zrU+27NyuKLCPrIJMPQ== X-Received: by 2002:a65:6a50:: with SMTP id o16mr12342978pgu.292.1605908573849; Fri, 20 Nov 2020 13:42:53 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id e8sm4713197pfj.157.2020.11.20.13.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 13:42:53 -0800 (PST) From: Mathieu Poirier To: ohad@wizery.com, bjorn.andersson@linaro.org Cc: guennadi.liakhovetski@linux.intel.com, arnaud.pouliquen@st.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 7/8] rpmsg: Make rpmsg_{register|unregister}_device() public Date: Fri, 20 Nov 2020 14:42:44 -0700 Message-Id: <20201120214245.172963-8-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201120214245.172963-1-mathieu.poirier@linaro.org> References: <20201120214245.172963-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make function rpmsg_register_device() and rpmsg_unregister_device() functions public so that they can be used by other clients. While doing so get rid of two obsolete function, i.e register_rpmsg_device() and unregister_rpmsg_device(), to prevent confusion. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Reviewed-by: Guennadi Liakhovetski --- drivers/rpmsg/rpmsg_internal.h | 4 ---- include/linux/rpmsg.h | 12 ++++++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/rpmsg/rpmsg_internal.h b/drivers/rpmsg/rpmsg_internal.h index f1de73e0f2d6..a76c344253bf 100644 --- a/drivers/rpmsg/rpmsg_internal.h +++ b/drivers/rpmsg/rpmsg_internal.h @@ -74,10 +74,6 @@ struct rpmsg_endpoint_ops { poll_table *wait); }; -int rpmsg_register_device(struct rpmsg_device *rpdev); -int rpmsg_unregister_device(struct device *parent, - struct rpmsg_channel_info *chinfo); - struct device *rpmsg_find_device(struct device *parent, struct rpmsg_channel_info *chinfo); diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index faf2daff6238..a5db828b2420 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -164,8 +164,9 @@ static inline __rpmsg64 cpu_to_rpmsg64(struct rpmsg_device *rpdev, u64 val) #if IS_ENABLED(CONFIG_RPMSG) -int register_rpmsg_device(struct rpmsg_device *dev); -void unregister_rpmsg_device(struct rpmsg_device *dev); +int rpmsg_register_device(struct rpmsg_device *rpdev); +int rpmsg_unregister_device(struct device *parent, + struct rpmsg_channel_info *chinfo); int __register_rpmsg_driver(struct rpmsg_driver *drv, struct module *owner); void unregister_rpmsg_driver(struct rpmsg_driver *drv); void rpmsg_destroy_ept(struct rpmsg_endpoint *); @@ -188,15 +189,18 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, #else -static inline int register_rpmsg_device(struct rpmsg_device *dev) +static inline int rpmsg_register_device(struct rpmsg_device *rpdev) { return -ENXIO; } -static inline void unregister_rpmsg_device(struct rpmsg_device *dev) +static inline int rpmsg_unregister_device(struct device *parent, + struct rpmsg_channel_info *chinfo) { /* This shouldn't be possible */ WARN_ON(1); + + return -ENXIO; } static inline int __register_rpmsg_driver(struct rpmsg_driver *drv, -- 2.25.1