Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2715558pxb; Tue, 13 Apr 2021 08:30:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSRMZXQ/WS1c3IPg6UNLH5e8zEH/znHe2iAY6tofImvkUNoyKTApDZ8ik655itoNKvMJPo X-Received: by 2002:a17:906:98c1:: with SMTP id zd1mr12657112ejb.447.1618327840556; Tue, 13 Apr 2021 08:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618327840; cv=none; d=google.com; s=arc-20160816; b=yTG4TeyCuSMQCmGow5Bvw0Iezwv/Yu05tkquHsIXqbAgSwycdVgx4fz4JzmQZYhE35 hpyRGbH8zmKS4ricK82H+Lj42CtmBW3Vb+yhV8vrnaUyJqrLP2m0RHxhJne6S49ROg6J cD7AlywEMv2uPn5tVJ5+ZOURF/iQqZRokfHz5iSBTiOpZhPZCLiUprsizUavbQJIeqHz gWa+k4DjfQeMZTa/3jRr0glKv8Yhv0xY/apV+DdxV5FQ4+fAXT2+XI1OGEOtLz9F6DmH JCvlIGy5YKma0GIA0i+nsKU6uc6aUGmBPoT+t5f1fvfpbzcb2soSXqS9VhBGtAt9E2/L EN3w== 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=5miKuAlqrK2CY7uXHNh+pm9/B3WaWNX9jTKLC9TfKlA=; b=IP+OpC9kIidgLnYhAzEW1HxI8LZJVNqLzWJMP/VGjj+AuDrvf8QGHY18I7V+NioGWY pl+N3w/C5LX94q47z5cuQg6ypqE0dhcXD7P2Hmopa7FD7sC2fkeEgeIsZuMxY4JXkQ/C 2sA2cTZWmxiyo17ryfUVfLN4b4dLRTozwo/B/zit5hJwMXSBWex92lh3oS+WMBim99W8 xWE98gMrrCe3Q2p3hhUV2pdyOzvVEHfxIZF7iKJGBl4RfcxKzjk+DOoOy2pqB0tZt+Ha 16/flKtQ+WvSLdj5eXPYbJ+YXC0ReMfiStonEcSjPzu4i8uaLVZE3M1aRmkTk8UyPF22 Yc7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=k2kAdKNQ; 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 i21si6427912ejk.516.2021.04.13.08.30.16; Tue, 13 Apr 2021 08:30:40 -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=k2kAdKNQ; 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 S1346113AbhDMNpv (ORCPT + 99 others); Tue, 13 Apr 2021 09:45:51 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:47856 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1346079AbhDMNpo (ORCPT ); Tue, 13 Apr 2021 09:45:44 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13DDhR6u031679; Tue, 13 Apr 2021 15:45:22 +0200 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=5miKuAlqrK2CY7uXHNh+pm9/B3WaWNX9jTKLC9TfKlA=; b=k2kAdKNQ0oAuCOkVobZQR7PwaIYTAm2wfntHyAMZVhEnsiYlAYAl/qFSr1EueEcdVm3L dQvzG5QH6VqW/L2nmTnOOxmYe+eh8ZnqDlSaSaCS5pmDqHV4Z6qJV1Y+equ75OWJMviS yc2kOkVV/HE3QBAEVHr+PGOQippgPYGDTPyicz1iVO9nXlFF+3hT4C/Kdn4QnskU2ph/ GATqkIIc0kgrzasdMAsgXiRKfMaIdmzo9UaTZ1MD3+b6KgGR4RoimR5nt0ULknJTCSra Ek/xczlg1q1miguMZDuWBK9cnJCo47KL/AQARSOPEqmorwTsKuDn48inR1+JHKRD4M1b Pg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 37vu4e52sn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Apr 2021 15:45:22 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B25B710002A; Tue, 13 Apr 2021 15:45:21 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A60FC226C5A; Tue, 13 Apr 2021 15:45:21 +0200 (CEST) Received: from localhost (10.75.127.50) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 13 Apr 2021 15:45:21 +0200 From: Arnaud Pouliquen To: Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier CC: , , , Subject: [PATCH v2 3/7] rpmsg: Update rpmsg_chrdev_register_device function Date: Tue, 13 Apr 2021 15:44:54 +0200 Message-ID: <20210413134458.17912-4-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210413134458.17912-1-arnaud.pouliquen@foss.st.com> References: <20210413134458.17912-1-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG1NODE2.st.com (10.75.127.2) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-04-13_07:2021-04-13,2021-04-13 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 v1 - move the rename of the rpmsg_ctrl driver from previous patch to this one. --- drivers/rpmsg/qcom_glink_native.c | 2 +- drivers/rpmsg/qcom_smd.c | 2 +- drivers/rpmsg/rpmsg_ctrl.c | 2 +- drivers/rpmsg/rpmsg_internal.h | 8 ++++---- drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- 5 files changed, 8 insertions(+), 8 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_ctrl.c b/drivers/rpmsg/rpmsg_ctrl.c index a5bb9ed97f32..059c228d0045 100644 --- a/drivers/rpmsg/rpmsg_ctrl.c +++ b/drivers/rpmsg/rpmsg_ctrl.c @@ -180,7 +180,7 @@ static struct rpmsg_driver rpmsg_ctrldev_driver = { .probe = rpmsg_ctrldev_probe, .remove = rpmsg_ctrldev_remove, .drv = { - .name = "rpmsg_chrdev", + .name = "rpmsg_ctrl", }, }; 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