From patchwork Mon Jan 25 09:03:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 572643 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A99FD1402DD for ; Mon, 25 Jan 2016 20:07:38 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755952AbcAYJGO (ORCPT ); Mon, 25 Jan 2016 04:06:14 -0500 Received: from mga14.intel.com ([192.55.52.115]:49698 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755839AbcAYJGA (ORCPT ); Mon, 25 Jan 2016 04:06:00 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 25 Jan 2016 01:05:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,343,1449561600"; d="scan'208";a="897699067" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.93]) by orsmga002.jf.intel.com with ESMTP; 25 Jan 2016 01:05:57 -0800 From: Heikki Krogerus To: Johannes Berg Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Alexandre Courbot , Thierry Reding , Stephen Warren Subject: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Date: Mon, 25 Jan 2016 12:03:48 +0300 Message-Id: <1453712629-143317-4-git-send-email-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.7.0.rc3 In-Reply-To: <1453712629-143317-1-git-send-email-heikki.krogerus@linux.intel.com> References: <1453712629-143317-1-git-send-email-heikki.krogerus@linux.intel.com> Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Pass the rfkill name and type to the device with properties instead of driver specific platform data. Signed-off-by: Heikki Krogerus CC: Alexandre Courbot CC: Thierry Reding CC: Stephen Warren Acked-by: Thierry Reding Tested-by: Marc Dietrich Acked-by: Johannes Berg Acked-by: Thierry Reding Acked-by: Arnd Bergmann --- arch/arm/mach-tegra/board-paz00.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 49d1110..52db8bf 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -17,23 +17,25 @@ * */ +#include #include #include -#include #include "board.h" -static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = { - .name = "wifi_rfkill", - .type = RFKILL_TYPE_WLAN, +static struct property_entry __initdata wifi_rfkill_prop[] = { + PROPERTY_ENTRY_STRING("name", "wifi_rfkill"), + PROPERTY_ENTRY_STRING("type", "wlan"), + { }, +}; + +static struct property_set __initdata wifi_rfkill_pset = { + .properties = wifi_rfkill_prop, }; static struct platform_device wifi_rfkill_device = { .name = "rfkill_gpio", .id = -1, - .dev = { - .platform_data = &wifi_rfkill_platform_data, - }, }; static struct gpiod_lookup_table wifi_gpio_lookup = { @@ -47,6 +49,7 @@ static struct gpiod_lookup_table wifi_gpio_lookup = { void __init tegra_paz00_wifikill_init(void) { + platform_device_add_properties(&wifi_rfkill_device, &wifi_rfkill_pset); gpiod_add_lookup_table(&wifi_gpio_lookup); platform_device_register(&wifi_rfkill_device); }