From patchwork Wed Apr 18 09:26:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10347639 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 B794360244 for ; Wed, 18 Apr 2018 09:27:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3F431FEBA for ; Wed, 18 Apr 2018 09:27:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A88DC28590; Wed, 18 Apr 2018 09:27:34 +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 544751FEBA for ; Wed, 18 Apr 2018 09:27:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753141AbeDRJ1b (ORCPT ); Wed, 18 Apr 2018 05:27:31 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34435 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630AbeDRJ13 (ORCPT ); Wed, 18 Apr 2018 05:27:29 -0400 Received: by mail-lf0-f66.google.com with SMTP id r7-v6so1622746lfr.1; Wed, 18 Apr 2018 02:27:28 -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=mBKsAGK1yvSKWPdGNYvN0KjvMpoWEZ9KnGpZzuHm1BLJM5J0h1H2/1oZWsYYJ8qJa5 xBrZPy7PQFGVX9uWqcg7aMUaGMMHgnKva0UXlmKOUdDtsl3nT4RBHSU5zz3WpuuqdRnE 4fidKGQyYn5aPlzrHuO0DflRjHgCNDWOrI+78gmICM9yVbFZw94d11UQUhScYr4iFCUR TJpCYL9ms37qoFHjSAYF9xnUcPCL6A5EavZcchCM45uX2+AU2EHzpc9dTTYcvrozUQJG kKbjBqe+V9zng8dLPjJ2eAWOCeLlPb5MxKaiB0CmjndDLcoOrRNQpZvAEZFNgp5xfCZT 2XYA== 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=bospUqpF6oX4ARt+3bniGSmJctu6GX+QrYHEloa43NmQfvGMwLmGUY+WschqnAp4g5 HOXkdB8XzlL9ysqaMMLx6rBCL8cISaJRJSRMBncRcAtJDbqqW0X63yv4NI+MwCpEG/hH Z0Us/+x7mAlHnMH8z0bVfURqhu4eVF7esdUk9S3iBSJEttn80AAcmxJII8NwaG7XJVEu vWxI0qNXmI+04+ONxrYfqrEGXpQ6ZEDJb92VUksHJfwD3NHw9BVqwHMTW7I40JW3X+Rz B+pWROc4VyvQc27KqVP5OXp3isf3DTmG3kKopHf9n+wDEJ8NuGqbrGZ+mSfeqjZ6mprK Q5jw== X-Gm-Message-State: ALQs6tDJ6+FlXjan2Wy4le9oyf6FgZu/bsMc08UoAXDIn8gQ6QjLeSrq JGIAHCEcYpO4SjkDCd9uFZs= X-Google-Smtp-Source: AIpwx48Rj+nggAfbAk8jtbDCJK1AVpJy7jBBFsbpOwYCbvx2+WfyQeso5/C7gnGkqzWHin8CHkiwuw== X-Received: by 10.46.118.22 with SMTP id r22mr928453ljc.144.1524043647860; Wed, 18 Apr 2018 02:27:27 -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 c64-v6sm181170lfe.3.2018.04.18.02.27.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Apr 2018 02:27:26 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1f8jN7-0003EM-4o; Wed, 18 Apr 2018 11:27:25 +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, Yoshihiro Shimoda , Johan Hovold Subject: [PATCH v2 1/6] USB: phy: drop unused legacy controller-phy bind helper Date: Wed, 18 Apr 2018 11:26:19 +0200 Message-Id: <20180418092624.12361-2-johan@kernel.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180418092624.12361-1-johan@kernel.org> References: <20180418092624.12361-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) { }