From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932597AbbCEKUS (ORCPT ); Thu, 5 Mar 2015 05:20:18 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:37078 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932129AbbCEKUN (ORCPT ); Thu, 5 Mar 2015 05:20:13 -0500 Message-ID: <1425550807.21331.3.camel@phoenix> Subject: [PATCH 2/3] phy: omap-usb2: Remove unneeded ifdef CONFIG_OF guard and of_match_ptr From: Axel Lin To: Kishon Vijay Abraham I Cc: Vignesh R , Roger Quadros , Felipe Balbi , "linux-kernel@vger.kernel.org" Date: Thu, 05 Mar 2015 18:20:07 +0800 In-Reply-To: <1425550725.21331.1.camel@phoenix> References: <1425550725.21331.1.camel@phoenix> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org if !CONFIG_OF, the probe fails. This is a dt-only driver, so the ifdef CONFIG_OF guard and of_match_ptr are not needed. Signed-off-by: Axel Lin --- drivers/phy/phy-omap-usb2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c index 6f4aef3..18b33ce 100644 --- a/drivers/phy/phy-omap-usb2.c +++ b/drivers/phy/phy-omap-usb2.c @@ -144,7 +144,6 @@ static struct phy_ops ops = { .owner = THIS_MODULE, }; -#ifdef CONFIG_OF static const struct usb_phy_data omap_usb2_data = { .label = "omap_usb2", .flags = OMAP_USB2_HAS_START_SRP | OMAP_USB2_HAS_SET_VBUS, @@ -185,7 +184,6 @@ static const struct of_device_id omap_usb2_id_table[] = { {}, }; MODULE_DEVICE_TABLE(of, omap_usb2_id_table); -#endif static int omap_usb2_probe(struct platform_device *pdev) { @@ -200,7 +198,7 @@ static int omap_usb2_probe(struct platform_device *pdev) const struct of_device_id *of_id; struct usb_phy_data *phy_data; - of_id = of_match_device(of_match_ptr(omap_usb2_id_table), &pdev->dev); + of_id = of_match_device(omap_usb2_id_table, &pdev->dev); if (!of_id) return -EINVAL; @@ -377,7 +375,7 @@ static struct platform_driver omap_usb2_driver = { .driver = { .name = "omap-usb2", .pm = DEV_PM_OPS, - .of_match_table = of_match_ptr(omap_usb2_id_table), + .of_match_table = omap_usb2_id_table, }, }; -- 1.9.1