Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1258386ybt; Thu, 2 Jul 2020 00:32:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgtcxBgHpDbf2Q3jp1Oc36oKXpk/QGrJPXHfEWSCqjMP0kRDSrAhbah2lHmeICeJ7GOMti X-Received: by 2002:a17:906:2b50:: with SMTP id b16mr27644211ejg.410.1593675126386; Thu, 02 Jul 2020 00:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593675126; cv=none; d=google.com; s=arc-20160816; b=rdbhonyOUeN3CmWRULyTmYdYSii1DMh5h8QTKmjKfF7WpOvWdXe3K9F7PbWeRevr9l 0Kw2ccpsSnQ8RsBbwbw/Yb525ZSnymbHePE4A8MdCGEs4vM2SAxP3Lf+NDM6RZNisPJD PxG+1j1IfF/QX0pQousVjxmsqbdFCPQlqDJt8NrFCx+8yMeyTzniIG3/JOlHxfKFF4O4 o42erbuPgGCriTskC8+wMBvodZQJshiyjWtQmU0dgwVt/eKxpvNJmPJI08AjMDJ1OdQd bmEwsPfqsGDsPHSVeqhwLObJLpwh6Ci47Lbd1/b7sl08jjRXazJIzzjuLqevAAqgkbGi bg+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cW1vAOVeKndvvs0mbg3wDU/Q9v5uqpDRmuW8N2p3D6g=; b=HsxpQL6TUIDR8HmZnN+wn1xX6BmpaINrSPu0ffxf2Y1WDtlf7D71nDxoXAca+iwdSD T7EaSupA4nKFxS4nHQ+WSxqFLjfeABSmvDN8zbfHAthQ8w4t6h6lHy9CBLIBGA6H3GoB 9xKXXmjEG8Fy4h1Vg14ZKIdPGI5UOJ7p0dxPbWUu+0upPWYeA+dDL5OuejR4hMl+SC9R JtOhevly7FVYaglh8vTF/lSqbivVNADNnxAJG7zsCL7vM+N//CPEatOnhA1fJgkO0KQf oydD3YRTwFmQ0LJY7sLLUMJhkXqh7jNVk7WezYRY/rTMpeP/+uN7tcvxN+G1cVB/bi8R rYNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DuA97I7g; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jp14si5316098ejb.93.2020.07.02.00.31.43; Thu, 02 Jul 2020 00:32: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=@kernel.org header.s=default header.b=DuA97I7g; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728041AbgGBH3W (ORCPT + 99 others); Thu, 2 Jul 2020 03:29:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:59310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726442AbgGBH3V (ORCPT ); Thu, 2 Jul 2020 03:29:21 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5048120899; Thu, 2 Jul 2020 07:29:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593674960; bh=2uFQ7JQtFXfbn+25A4c9LawA5iVUvX+l4OINIBGRmlo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DuA97I7g3EcTB56j+3mIjVFbKHz4EcQlJ2ECkPYDwWGaOj9PXDPtBsBli/D3orT8E fBHt9QLkEVQBhZ0WFhuYExBDjVVAMqnMh1Qmf7FB+EI8KB5wmKiL8r2T0bk7+0MGf1 By+CjxPBB7gqo98TyzqBxDxp+t8KpM8DNTPZ/oLs= From: Greg Kroah-Hartman To: balbi@kernel.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH 2/2] USB: phy: fsl-usb: remove character device usage Date: Thu, 2 Jul 2020 09:29:14 +0200 Message-Id: <20200702072914.1072878-2-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200702072914.1072878-1-gregkh@linuxfoundation.org> References: <20200702072914.1072878-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No idea why this driver is using a char device node, statically allocated, with no dynamic allocation or hook up with devtmpfs, along with a reserverd major number, for "special" operations, not all of which ever were implemented. So just rip it out, as no one must be using it because no modern system will ever actually create the /dev/ node it needs. Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/phy/phy-fsl-usb.c | 69 ----------------------------------- drivers/usb/phy/phy-fsl-usb.h | 14 ------- 2 files changed, 83 deletions(-) diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c index 93d2257aeec8..0c6d9f9f2994 100644 --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c @@ -957,67 +957,6 @@ int usb_otg_start(struct platform_device *pdev) return 0; } -/* Char driver interface to control some OTG input */ - -/* - * Handle some ioctl command, such as get otg - * status and set host suspend - */ -static long fsl_otg_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - u32 retval = 0; - - switch (cmd) { - case GET_OTG_STATUS: - retval = fsl_otg_dev->host_working; - break; - - case SET_A_SUSPEND_REQ: - fsl_otg_dev->fsm.a_suspend_req_inf = arg; - break; - - case SET_A_BUS_DROP: - fsl_otg_dev->fsm.a_bus_drop = arg; - break; - - case SET_A_BUS_REQ: - fsl_otg_dev->fsm.a_bus_req = arg; - break; - - case SET_B_BUS_REQ: - fsl_otg_dev->fsm.b_bus_req = arg; - break; - - default: - break; - } - - otg_statemachine(&fsl_otg_dev->fsm); - - return retval; -} - -static int fsl_otg_open(struct inode *inode, struct file *file) -{ - return 0; -} - -static int fsl_otg_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static const struct file_operations otg_fops = { - .owner = THIS_MODULE, - .llseek = NULL, - .read = NULL, - .write = NULL, - .unlocked_ioctl = fsl_otg_ioctl, - .open = fsl_otg_open, - .release = fsl_otg_release, -}; - static int fsl_otg_probe(struct platform_device *pdev) { int ret; @@ -1039,12 +978,6 @@ static int fsl_otg_probe(struct platform_device *pdev) return ret; } - ret = register_chrdev(FSL_OTG_MAJOR, FSL_OTG_NAME, &otg_fops); - if (ret) { - dev_err(&pdev->dev, "unable to register FSL OTG device\n"); - return ret; - } - return ret; } @@ -1061,8 +994,6 @@ static int fsl_otg_remove(struct platform_device *pdev) kfree(fsl_otg_dev->phy.otg); kfree(fsl_otg_dev); - unregister_chrdev(FSL_OTG_MAJOR, FSL_OTG_NAME); - if (pdata->exit) pdata->exit(pdev); diff --git a/drivers/usb/phy/phy-fsl-usb.h b/drivers/usb/phy/phy-fsl-usb.h index fbcc28ad9964..d70341ae5a92 100644 --- a/drivers/usb/phy/phy-fsl-usb.h +++ b/drivers/usb/phy/phy-fsl-usb.h @@ -371,21 +371,7 @@ struct fsl_otg_config { u8 otg_port; }; -/* For SRP and HNP handle */ -#define FSL_OTG_MAJOR 240 #define FSL_OTG_NAME "fsl-usb2-otg" -/* Command to OTG driver ioctl */ -#define OTG_IOCTL_MAGIC FSL_OTG_MAJOR -/* if otg work as host, it should return 1, otherwise return 0 */ -#define GET_OTG_STATUS _IOR(OTG_IOCTL_MAGIC, 1, int) -#define SET_A_SUSPEND_REQ _IOW(OTG_IOCTL_MAGIC, 2, int) -#define SET_A_BUS_DROP _IOW(OTG_IOCTL_MAGIC, 3, int) -#define SET_A_BUS_REQ _IOW(OTG_IOCTL_MAGIC, 4, int) -#define SET_B_BUS_REQ _IOW(OTG_IOCTL_MAGIC, 5, int) -#define GET_A_SUSPEND_REQ _IOR(OTG_IOCTL_MAGIC, 6, int) -#define GET_A_BUS_DROP _IOR(OTG_IOCTL_MAGIC, 7, int) -#define GET_A_BUS_REQ _IOR(OTG_IOCTL_MAGIC, 8, int) -#define GET_B_BUS_REQ _IOR(OTG_IOCTL_MAGIC, 9, int) void fsl_otg_add_timer(struct otg_fsm *fsm, void *timer); void fsl_otg_del_timer(struct otg_fsm *fsm, void *timer); -- 2.27.0