From patchwork Mon Jun 27 11:34:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 9200411 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 AE64E60757 for ; Mon, 27 Jun 2016 11:35:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F37E2837F for ; Mon, 27 Jun 2016 11:35:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93F492854B; Mon, 27 Jun 2016 11:35:49 +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 097DA2837F for ; Mon, 27 Jun 2016 11:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751862AbcF0LfH (ORCPT ); Mon, 27 Jun 2016 07:35:07 -0400 Received: from mga14.intel.com ([192.55.52.115]:38009 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752033AbcF0LfC (ORCPT ); Mon, 27 Jun 2016 07:35:02 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 27 Jun 2016 04:34:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,536,1459839600"; d="scan'208";a="835887676" Received: from black.fi.intel.com ([10.237.72.93]) by orsmga003.jf.intel.com with ESMTP; 27 Jun 2016 04:34:09 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 438A0B7; Mon, 27 Jun 2016 14:34:08 +0300 (EEST) From: Mika Westerberg To: Mark Brown Cc: Jarkko Nikula , Mika Westerberg , linux-spi@vger.kernel.org Subject: [PATCH RESEND] spi: spidev: Allow matching DT compatible strings from ACPI Date: Mon, 27 Jun 2016 14:34:08 +0300 Message-Id: <1467027248-6191-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,