Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4202227pxf; Tue, 23 Mar 2021 05:30:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOox3lGVIotjqvRpvrsvdfMI0IrcJ6/w8mEfNWs77a7wEisBvldjR5QyJdqpqOBTIuy97U X-Received: by 2002:a05:6402:408:: with SMTP id q8mr4213471edv.201.1616502606967; Tue, 23 Mar 2021 05:30:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616502606; cv=none; d=google.com; s=arc-20160816; b=shsiYuFI5VvF8v84UOE0GUEytGNDiyxXgJCOYh/DagoF7qWq1y/RMvzWF8FcT7fZVN vLRBYjZ8AiWCLMcXY7UKseGU9ZXIcJpuUnTbgzchzuS+YtgT4PvAQtzaMPFwVzP2VGUB VRlBOqPi3mcJ9QbCtWZFXsVOyhBtw4VQxItQTZNzf2YWRdWAy1T1U8TQgwClPOLHdQ42 NskACfLc670MlSEDGyIyDtqkl8NTPA+etoyM/J/9siAUlaobDroi3s2wjAQNhEcMMlVQ 8MaAQIPEZYLv4+gOZ5iQ+JSl0iI5ilLqxYEPfGBzMl5fWxvA2oDZJcJyEF6UGshj+wQ/ mLKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=jRSXDo8CuhPat2efQbWeyELVKrjrqiJuTxjGww95LP8=; b=shNRY/gI5Imxk/aaEITO8HstGHcCGbw/evcWlF7rR6Uhb0b5tEDlVyNZRwkbT7dsoK nBPyNbpZjOleTTgdjyGPZsbayXsF1MLygq5MmJKiTZ0Imv1lcfFq1VTXC6B+o/tFzTks v3HDcvdeiMaoRsFuOHD3Zgmc9kHGJ/NyxQ+qkmYN8+yKUO5p5vol/kUQ816SJCH7WGfL 0Meu+CLqR2k0ZuvItZKtYSousxapZhe8ae5xDJ2D8mVbA1otmdX2smCRGegeMG7Yzs4z zNOjAsQvD7fsWrNfsBbVJBjMsc+drMob+F9SDY9R4tcji9khDv/XekYCpxU/5A9U4Kzc +jdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=qkzZvA9x; 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=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lt10si13128983ejb.16.2021.03.23.05.29.44; Tue, 23 Mar 2021 05:30:06 -0700 (PDT) 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=@foss.st.com header.s=selector1 header.b=qkzZvA9x; 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=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231152AbhCWM3B (ORCPT + 99 others); Tue, 23 Mar 2021 08:29:01 -0400 Received: from mx07-00178001.pphosted.com ([185.132.182.106]:11304 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbhCWM2d (ORCPT ); Tue, 23 Mar 2021 08:28:33 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 12NCR8eW022696; Tue, 23 Mar 2021 13:28:28 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=jRSXDo8CuhPat2efQbWeyELVKrjrqiJuTxjGww95LP8=; b=qkzZvA9xuz/YIRo5XtzuwXDSpm2eJq2MDwrobuPvH3nL+WpwQFjGq8l60OhHHwCfLOvP HYGaXFznicHuH3b5HjrpPIQtjdZx68FBTSdWd250ayyhC+F4ROwYskrO0yKamWFYcsCd G8x5tAyypjXXEvPdXvcEjmfUmIxZuRByjCjiRqhWBINUvdk0aiVKQLZwA3kxkLzCGV4e n0/5Sg06nE72tgaxWAMWKudIe+ARr8mJDpPjrTxs3ArYT5K4dOaPjp6cI8y5+Za6iH5B nYY9CUxoAztqzEu8G066j3sncgvj9B1DG7k7YyzUOhM559EiP2xtPHbJQ7gOubjpXNrc fQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 37fb17a0e3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Mar 2021 13:28:28 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A664C100034; Tue, 23 Mar 2021 13:28:27 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 9863F24CF45; Tue, 23 Mar 2021 13:28:27 +0100 (CET) Received: from localhost (10.75.127.45) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 23 Mar 2021 13:28:26 +0100 From: Arnaud Pouliquen To: Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier , Andy Gross CC: , , , , Subject: [PATCH 3/7] rpmsg: Update rpmsg_chrdev_register_device function Date: Tue, 23 Mar 2021 13:27:33 +0100 Message-ID: <20210323122737.23035-4-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210323122737.23035-1-arnaud.pouliquen@foss.st.com> References: <20210323122737.23035-1-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-03-23_06:2021-03-22,2021-03-23 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The rpmsg_chrdev driver has been replaced by the rpmsg_ctrl driver for the /dev/rpmsg_ctrlX devices management. The reference for the driver override is now the rpmsg_ctrl. Update the rpmsg_chrdev_register_device function to reflect the update, and rename the function to use the rpmsg_ctrldev prefix. The platform drivers are updated accordingly. Signed-off-by: Arnaud Pouliquen --- update from [1] - changelog update - no more initialize source and destination address to RPMSG_ADDR_ANY - rename rpmsg_ctrl_register_device in rpmsg_ctrldev_register_device - add virtio platform update [1] https://patchwork.kernel.org/project/linux-remoteproc/patch/20210219111501.14261-8-arnaud.pouliquen@foss.st.com/ --- drivers/rpmsg/qcom_glink_native.c | 2 +- drivers/rpmsg/qcom_smd.c | 2 +- drivers/rpmsg/rpmsg_internal.h | 8 ++++---- drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 05533c71b10e..7d7e809800ec 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -1642,7 +1642,7 @@ static int qcom_glink_create_chrdev(struct qcom_glink *glink) rpdev->dev.parent = glink->dev; rpdev->dev.release = qcom_glink_device_release; - return rpmsg_chrdev_register_device(rpdev); + return rpmsg_ctrldev_register_device(rpdev); } struct qcom_glink *qcom_glink_native_probe(struct device *dev, diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 8da1b5cb31b3..d223e438d17c 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1113,7 +1113,7 @@ static int qcom_smd_create_chrdev(struct qcom_smd_edge *edge) qsdev->rpdev.dev.parent = &edge->dev; qsdev->rpdev.dev.release = qcom_smd_release_device; - return rpmsg_chrdev_register_device(&qsdev->rpdev); + return rpmsg_ctrldev_register_device(&qsdev->rpdev); } /* diff --git a/drivers/rpmsg/rpmsg_internal.h b/drivers/rpmsg/rpmsg_internal.h index a76c344253bf..8c500a8f29aa 100644 --- a/drivers/rpmsg/rpmsg_internal.h +++ b/drivers/rpmsg/rpmsg_internal.h @@ -82,16 +82,16 @@ struct rpmsg_device *rpmsg_create_channel(struct rpmsg_device *rpdev, int rpmsg_release_channel(struct rpmsg_device *rpdev, struct rpmsg_channel_info *chinfo); /** - * rpmsg_chrdev_register_device() - register chrdev device based on rpdev + * rpmsg_ctrl_register_device() - register a char device for control based on rpdev * @rpdev: prepared rpdev to be used for creating endpoints * * This function wraps rpmsg_register_device() preparing the rpdev for use as * basis for the rpmsg chrdev. */ -static inline int rpmsg_chrdev_register_device(struct rpmsg_device *rpdev) +static inline int rpmsg_ctrldev_register_device(struct rpmsg_device *rpdev) { - strcpy(rpdev->id.name, "rpmsg_chrdev"); - rpdev->driver_override = "rpmsg_chrdev"; + strcpy(rpdev->id.name, "rpmsg_ctrl"); + rpdev->driver_override = "rpmsg_ctrl"; return rpmsg_register_device(rpdev); } diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 8e49a3bacfc7..e42234a3e2ab 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c @@ -840,7 +840,7 @@ static struct rpmsg_device *rpmsg_virtio_add_ctrl_dev(struct virtio_device *vdev rpdev_ctrl->dev.release = virtio_rpmsg_release_device; rpdev_ctrl->little_endian = virtio_is_little_endian(vrp->vdev); - err = rpmsg_chrdev_register_device(rpdev_ctrl); + err = rpmsg_ctrldev_register_device(rpdev_ctrl); if (err) { kfree(vch); return ERR_PTR(err); -- 2.17.1