From patchwork Sat Apr 14 13:06:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10341211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5D59060153 for ; Sat, 14 Apr 2018 13:06:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DFF828A83 for ; Sat, 14 Apr 2018 13:06:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42EC828A8B; Sat, 14 Apr 2018 13:06:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D70E528A83 for ; Sat, 14 Apr 2018 13:06:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750970AbeDNNGr (ORCPT ); Sat, 14 Apr 2018 09:06:47 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:45535 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750883AbeDNNGp (ORCPT ); Sat, 14 Apr 2018 09:06:45 -0400 Received: by mail-lf0-f65.google.com with SMTP id q5-v6so16060080lff.12; Sat, 14 Apr 2018 06:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=+Ej5BA5JSlkpt8+5u+jKS13OAPJdmR+SwtNROav06q4=; b=I4Tw6kDaK7ThtwSfE97gP2JDE4/LlRQKwylP9aJk39FUu3S5JGSPMjER8VF0ZGACFn vSbOHQL/iD9gHdYQqghe2oIr71akueBO6Yd2yelBvCzV53LIQiRR+APBYxmD7Akb8bWY tu/J+S0KbA7klTit4nOHsxBaHrJ3u1k3QLJMhDmXE0tb6LQYf7eGfu096HSQSEFHjKRQ oKg+IiiqYgxHf+fy/1oG3drEcADzdznun22QLSty4lb/5LoF6yKN/n9pL7+qPvNUCxM6 htGxgrf6B7pa5qZX4y3Dg3aP3mxmwb4QeFSpBSslnsazUZDM9+LQoS1EXcYYtJ+2RN9Z uh0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=+Ej5BA5JSlkpt8+5u+jKS13OAPJdmR+SwtNROav06q4=; b=Mk1BW18kUWNqxqsYcfWonxyDHUB1uZQQbh5KSfMrtAFgfLutmDN0hYnjuIw36xgbzv TQd1J2ha+cmBgs15bA94H+f5ETrjPT+7iDvtCIc7F953NYrDEUz1knOLaEVsEbyaqx9p TaKzFPaicZGEelzQCtaMGEMKaFeaz83n9VOK6yZ2j8W96wOZGSybct3/RGxJPEIDl4KH D3fG8mqrD0nSraEzl4Yaik4uuAi8uPgW0HbQ0ULlRyg+KplpiXoiKAF3fcfHEBO7gtx5 zkT8TxUhJ8qTcUsbnjhJMA4BJyBwK+oSmaDfpqTOqiUeWylGVHhaiiskCqh9tr73LBZo Nlww== X-Gm-Message-State: ALQs6tC05+eOiFaJFuFcJxPQN/fmyIoNMTL/D6BLvw2BJDLa2iI+xA+3 XDahVSOnmo9X/0/xugl3bTo= X-Google-Smtp-Source: AIpwx4+L0IU3+UF0BjANOcXVbTkICU5st9L6zptdZQkd5qNQdreq32HuVHCTaSRGVA8d1/wrHSJ1CA== X-Received: by 10.46.158.85 with SMTP id g21mr2141406ljk.30.1523711203756; Sat, 14 Apr 2018 06:06:43 -0700 (PDT) Received: from xi.terra (c-8bb2e655.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.230.178.139]) by smtp.gmail.com with ESMTPSA id d24sm1379100ljc.24.2018.04.14.06.06.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Apr 2018 06:06:42 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1f7Kt5-00063r-GK; Sat, 14 Apr 2018 15:06:39 +0200 From: Johan Hovold To: Greg Kroah-Hartman , Felipe Balbi Cc: Alan Stern , Bin Liu , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, Johan Hovold Subject: [PATCH 1/6] USB: phy: drop unused legacy controller-phy bind helper Date: Sat, 14 Apr 2018 15:06:13 +0200 Message-Id: <20180414130618.23249-2-johan@kernel.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180414130618.23249-1-johan@kernel.org> References: <20180414130618.23249-1-johan@kernel.org> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Drop the unused legacy usb_bind_phy() helper whose last user was removed in 2016 when OMAP moved to device-tree boot (9080b8dc761a ("ARM: OMAP2+: Remove legacy usb-host.c platform init code")). Note that this means that for the last couple of years the phy_bind_list has been empty (when using mainline kernels) and that consequently all phy lookups using the usb_get_phy_dev() interface have failed with -ENODEV. This helper along with its current users will be removed by follow-on patches. Signed-off-by: Johan Hovold --- drivers/usb/phy/phy.c | 34 ---------------------------------- include/linux/usb/phy.h | 8 -------- 2 files changed, 42 deletions(-) diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index bceb2c9988dd..833547b00383 100644 --- a/drivers/usb/phy/phy.c +++ b/drivers/usb/phy/phy.c @@ -795,40 +795,6 @@ void usb_remove_phy(struct usb_phy *x) } EXPORT_SYMBOL_GPL(usb_remove_phy); -/** - * usb_bind_phy - bind the phy and the controller that uses the phy - * @dev_name: the device name of the device that will bind to the phy - * @index: index to specify the port number - * @phy_dev_name: the device name of the phy - * - * Fills the phy_bind structure with the dev_name and phy_dev_name. This will - * be used when the phy driver registers the phy and when the controller - * requests this phy. - * - * To be used by platform specific initialization code. - */ -int usb_bind_phy(const char *dev_name, u8 index, - const char *phy_dev_name) -{ - struct usb_phy_bind *phy_bind; - unsigned long flags; - - phy_bind = kzalloc(sizeof(*phy_bind), GFP_KERNEL); - if (!phy_bind) - return -ENOMEM; - - phy_bind->dev_name = dev_name; - phy_bind->phy_dev_name = phy_dev_name; - phy_bind->index = index; - - spin_lock_irqsave(&phy_lock, flags); - list_add_tail(&phy_bind->list, &phy_bind_list); - spin_unlock_irqrestore(&phy_lock, flags); - - return 0; -} -EXPORT_SYMBOL_GPL(usb_bind_phy); - /** * usb_phy_set_event - set event to phy event * @x: the phy returned by usb_get_phy(); diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index b7a2625947f5..ac5a079161e1 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h @@ -242,8 +242,6 @@ extern struct usb_phy *devm_usb_get_phy_by_node(struct device *dev, struct device_node *node, struct notifier_block *nb); extern void usb_put_phy(struct usb_phy *); extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x); -extern int usb_bind_phy(const char *dev_name, u8 index, - const char *phy_dev_name); extern void usb_phy_set_event(struct usb_phy *x, unsigned long event); extern void usb_phy_set_charger_current(struct usb_phy *usb_phy, unsigned int mA); @@ -293,12 +291,6 @@ static inline void devm_usb_put_phy(struct device *dev, struct usb_phy *x) { } -static inline int usb_bind_phy(const char *dev_name, u8 index, - const char *phy_dev_name) -{ - return -EOPNOTSUPP; -} - static inline void usb_phy_set_event(struct usb_phy *x, unsigned long event) { }