From patchwork Mon Nov 11 22:37:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 179160 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7285587ilf; Mon, 11 Nov 2019 14:37:32 -0800 (PST) X-Google-Smtp-Source: APXvYqzTweCZC2wLkzsMps2GCrHhRf1VoIyOnErfgHLL5OnxcJESSIHuvYtVlxvqyU0O7gzYa8GL X-Received: by 2002:a50:c408:: with SMTP id v8mr29242931edf.140.1573511852012; Mon, 11 Nov 2019 14:37:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573511852; cv=none; d=google.com; s=arc-20160816; b=D0+Gk3eNXHp+99+41DNPLCHoj1o3xwGaB8QGlBVzKpJwRzLmqK1CmoumnJgZu+Gyyz PWUImRHwCoTfpWqFJcDZ13yBS7gWKYw367+zVJbh5RUcZ7h6Tci5FhXl58hSvHdD41uD b8tXCPmz5DWba8gjpdgYf+YZZgj0xxcFmkLp14eBhTzdxeYVB7WxCHwIslIaRkJNrU22 sZxMJsm7VhpeenQUo5u2us8+VSsCm4DsNCfA/nUyTHBPCWGxhHavLG+rTecVjSd85p8z U8IBGDHTaoR3WPvKiWDjr+QzItXDSM9KNsAfA5oG7W3Ui+f9Zq0JVv+OB6u6jaLOc6Uk K4mw== 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 :message-id:date:subject:cc:to:from; bh=x+9NT4RUkYWcaULFP2FiiexE7xowQr4kg1CcbSxpgfY=; b=clyU4eas96mjOm+F3KwyNi5sdOb6FmIY1i7EXk3YYauHK1g7h+Iu9nw+X/0xPwtksM 0ppowKkOBB2Ycw6jC7/SMy7QIs3Pe7fhNVR3urlmVaY3ozN3YYR0HyLs6SBHfX/WW6x6 1w/EDGO3JssrKDGRrxp51JE42rmkzMiWwsRoRfNjeFqPl9MU2Jk8grtwLC3AZO7XLjvB GnOexzOWlnycTtSuYW2l5+0tH4VxVn2MosUyEp852W0DFn2XaoGKZU0ZG5wlJaeegXWp 1XMWmwG+PtccfQyAm4WGwceMmw6WinzS2Nh2vANKXTM33Kf53y6qKjc0jJTnDLkLvSEo hLKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si12651361edc.426.2019.11.11.14.37.31; Mon, 11 Nov 2019 14:37:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727626AbfKKWha (ORCPT + 26 others); Mon, 11 Nov 2019 17:37:30 -0500 Received: from mx2.suse.de ([195.135.220.15]:33642 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726912AbfKKWha (ORCPT ); Mon, 11 Nov 2019 17:37:30 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AAEA9AC8B; Mon, 11 Nov 2019 22:37:28 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: Hartley Sweeten , Alexander Sverdlin Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , Greg Kroah-Hartman , Russell King Subject: [PATCH] ARM: ep93xx: Avoid soc_device_to_device() Date: Mon, 11 Nov 2019 23:37:22 +0100 Message-Id: <20191111223722.2364-1-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ep93xx_init_soc() uses soc_device_to_device() to return a device to ep93xx_init_devices(), where it is passed on to its callers, who all ignore the return value. As this helper is deprecated, change the return type of ep93xx_init_devices() to void and have ep93xx_init_soc() return the soc_device instead. Cc: Greg Kroah-Hartman Signed-off-by: Andreas Färber --- arch/arm/mach-ep93xx/core.c | 12 ++++-------- arch/arm/mach-ep93xx/platform.h | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) -- 2.16.4 Acked-by: Alexander Sverdlin Reviewed-by: Greg Kroah-Hartman diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 6fb19a393fd2..7a0c82b30564 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -937,7 +937,7 @@ static const char __init *ep93xx_get_machine_name(void) return kasprintf(GFP_KERNEL,"%s", machine_desc->name); } -static struct device __init *ep93xx_init_soc(void) +static struct soc_device __init *ep93xx_init_soc(void) { struct soc_device_attribute *soc_dev_attr; struct soc_device *soc_dev; @@ -958,13 +958,11 @@ static struct device __init *ep93xx_init_soc(void) return NULL; } - return soc_device_to_device(soc_dev); + return soc_dev; } -struct device __init *ep93xx_init_devices(void) +void __init ep93xx_init_devices(void) { - struct device *parent; - /* Disallow access to MaverickCrunch initially */ ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA); @@ -975,7 +973,7 @@ struct device __init *ep93xx_init_devices(void) EP93XX_SYSCON_DEVCFG_GONIDE | EP93XX_SYSCON_DEVCFG_HONIDE); - parent = ep93xx_init_soc(); + ep93xx_init_soc(); /* Get the GPIO working early, other devices need it */ platform_device_register(&ep93xx_gpio_device); @@ -989,8 +987,6 @@ struct device __init *ep93xx_init_devices(void) platform_device_register(&ep93xx_wdt_device); gpio_led_register_device(-1, &ep93xx_led_data); - - return parent; } void ep93xx_restart(enum reboot_mode mode, const char *cmd) diff --git a/arch/arm/mach-ep93xx/platform.h b/arch/arm/mach-ep93xx/platform.h index b4045a186239..8a3a2be50f11 100644 --- a/arch/arm/mach-ep93xx/platform.h +++ b/arch/arm/mach-ep93xx/platform.h @@ -34,7 +34,7 @@ void ep93xx_register_ac97(void); void ep93xx_register_ide(void); void ep93xx_register_adc(void); -struct device *ep93xx_init_devices(void); +void ep93xx_init_devices(void); extern void ep93xx_timer_init(void); void ep93xx_restart(enum reboot_mode, const char *);