From patchwork Fri Jun 10 10:55:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 9169467 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 EE218604DB for ; Fri, 10 Jun 2016 10:55:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E04062824F for ; Fri, 10 Jun 2016 10:55:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC13E2835A; Fri, 10 Jun 2016 10:55:53 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 61CD42824F for ; Fri, 10 Jun 2016 10:55:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932342AbcFJKzw (ORCPT ); Fri, 10 Jun 2016 06:55:52 -0400 Received: from mga02.intel.com ([134.134.136.20]:24254 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932278AbcFJKzw (ORCPT ); Fri, 10 Jun 2016 06:55:52 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 10 Jun 2016 03:55:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,449,1459839600"; d="scan'208";a="994952913" Received: from black.fi.intel.com ([10.237.72.93]) by orsmga002.jf.intel.com with ESMTP; 10 Jun 2016 03:55:50 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 9D68F299; Fri, 10 Jun 2016 13:55:47 +0300 (EEST) From: Mika Westerberg To: Mark Brown Cc: Jarkko Nikula , Mika Westerberg , linux-spi@vger.kernel.org Subject: [PATCH] spi: spidev: Allow matching DT compatible strings from ACPI Date: Fri, 10 Jun 2016 13:55:47 +0300 Message-Id: <1465556147-86198-1-git-send-email-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.8.1 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow the same devices to be used in ACPI based systems if they provide proper DT compatible string. Signed-off-by: Mika Westerberg --- drivers/spi/spidev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index e3c19f30f591..86a4c28b9e58 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -691,14 +691,12 @@ static const struct file_operations spidev_fops = { static struct class *spidev_class; -#ifdef CONFIG_OF static const struct of_device_id spidev_dt_ids[] = { { .compatible = "rohm,dh2228fv" }, { .compatible = "lineartechnology,ltc2488" }, {}, }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -#endif /*-------------------------------------------------------------------------*/ @@ -788,7 +786,7 @@ static int spidev_remove(struct spi_device *spi) static struct spi_driver spidev_spi_driver = { .driver = { .name = "spidev", - .of_match_table = of_match_ptr(spidev_dt_ids), + .of_match_table = spidev_dt_ids, }, .probe = spidev_probe, .remove = spidev_remove,