From patchwork Wed Oct 10 17:09:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10635097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 59A7D3CF1 for ; Wed, 10 Oct 2018 18:47:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B73128578 for ; Wed, 10 Oct 2018 18:47:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E4E02A2BF; Wed, 10 Oct 2018 18:47:12 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B768428578 for ; Wed, 10 Oct 2018 18:47:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xoBr9qKPhhA8FGnXZBEi2QgY88C6E7f8t4wLny18/Lk=; b=S061+5O/jGwpAw jyc4LtG0eq055VMMU2nX4WdXVi6VX81JBzv1A9HOn7qQ5lryh7hrdFxbryC8P9A7gQ1IhJOVrMXwA JKUmqJsfrORgoKXCsNFUh7AN7ob5d07qJJ1mJ1LCZ4iajuSZrKewKSdWd/gsktv/3rPkYaoTJFDI9 pop+uILT4Wtc3u/5JtQ21chnTFAnrwbYDd+0UfMyga8CsL2BAGcABkieCjAl37q0ebluYgS044P+K v/zNkH5bfydcGiMJwXlNQAn2vU5P+ZvWCaywLymXvF364rhEOpY/S4bKgBgQLtpG6PMHZxNQZC+6n qbDfNZGrhxzHRjHpAdbw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAJVZ-0006Wl-NB; Wed, 10 Oct 2018 18:46:57 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAJVW-0006W3-SI for linux-arm-kernel@bombadil.infradead.org; Wed, 10 Oct 2018 18:46:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+6+oO/gdffPAe4CKaFcHV+LI0OzsWMN8iFuqq8yBic8=; b=sLk6R+//2Wcwxaih2o7GznCbeu 7QgA9viSnczz/YJWXYzpfNb/anq0jDFGZrYmCrfDS5XIwtAL7Hscj+zXg2Y9u+6q1fZczD9HFWyK+ KpGTqYX2r3UJsK/hUspP4rhVTI3ZbY5SphhX96x5vl3+J7PqrFeHgjrWjEd4UscjgULVLvBr2RszF NfAmKkzJQJWfZzXW5BARFu6Zr67WMJB5KxrtxsvJVwjo0/Ted1IdISebDynloz0BP6sPGXRxS8YR1 OfGrYYQcist870uWe9psZz7bfgtpOV2U4FsAerf2heOi88unilwEDBZYaseTZieXKH8HBaqBgXLx0 +FmBlzxg==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAI07-0006qu-Lq for linux-arm-kernel@lists.infradead.org; Wed, 10 Oct 2018 17:10:25 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 90227BCFA8; Wed, 10 Oct 2018 19:10:16 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id heItyk6ZBJIb; Wed, 10 Oct 2018 19:10:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id D4281BCF9B; Wed, 10 Oct 2018 19:09:56 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TYDpJjB-UXnv; Wed, 10 Oct 2018 19:09:53 +0200 (CEST) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 51E82BCF87; Wed, 10 Oct 2018 19:09:52 +0200 (CEST) From: Lubomir Rintel To: Mark Brown , Geert Uytterhoeven Subject: [PATCH 03/11] spi: pxa2xx: Use an enum for type Date: Wed, 10 Oct 2018 19:09:28 +0200 Message-Id: <20181010170936.316862-4-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181010170936.316862-1-lkundrak@v3.sk> References: <20181010170936.316862-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181010_131023_844524_B7AEB5AE X-CRM114-Status: GOOD ( 10.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Eric Miao , James Cameron , linux-kernel@vger.kernel.org, Haojian Zhuang , linux-spi@vger.kernel.org, Lubomir Rintel , Rob Herring , linux-arm-kernel@lists.infradead.org, Robert Jarzmik , Daniel Mack Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP That seems to be the correct type. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- drivers/spi/spi-pxa2xx.c | 6 +++--- include/linux/pxa2xx_ssp.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 14f4ea59caff..f674541675bb 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1429,7 +1429,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) struct resource *res; const struct acpi_device_id *adev_id = NULL; const struct pci_device_id *pcidev_id = NULL; - int type; + enum pxa_ssp_type type; adev = ACPI_COMPANION(&pdev->dev); @@ -1443,9 +1443,9 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) return NULL; if (adev_id) - type = (int)adev_id->driver_data; + type = (enum pxa_ssp_type)adev_id->driver_data; else if (pcidev_id) - type = (int)pcidev_id->driver_data; + type = (enum pxa_ssp_type)pcidev_id->driver_data; else return NULL; diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h index 13b4244d44c1..262e1f318836 100644 --- a/include/linux/pxa2xx_ssp.h +++ b/include/linux/pxa2xx_ssp.h @@ -217,7 +217,7 @@ struct ssp_device { const char *label; int port_id; - int type; + enum pxa_ssp_type type; int use_count; int irq;