From patchwork Sun Oct 6 20:27:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 2993281 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 37D8D9F1C4 for ; Sun, 6 Oct 2013 20:29:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4088B201FA for ; Sun, 6 Oct 2013 20:29:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B675201F5 for ; Sun, 6 Oct 2013 20:29:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754615Ab3JFU2i (ORCPT ); Sun, 6 Oct 2013 16:28:38 -0400 Received: from ring0.de ([91.143.88.219]:45514 "EHLO smtp.ring0.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753322Ab3JFU2f (ORCPT ); Sun, 6 Oct 2013 16:28:35 -0400 Received: from comu.ring0.de (unknown [127.0.0.1]) by smtp.ring0.de (Postfix) with ESMTP id 3A1F92C58ED0; Sun, 6 Oct 2013 22:28:34 +0200 (CEST) Received: (from spamd@localhost) by comu.ring0.de (8.13.8/8.13.8/Submit) id r96KSNB8009686; Sun, 6 Oct 2013 22:28:23 +0200 X-Authentication-Warning: comu.ring0.de: spamd set sender to sre@ring0.de using -f X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from sre.ring0.de (unknown [79.254.219.100]) by smtp.ring0.de (Postfix) with ESMTP id F37CF2C58EDB; Sun, 6 Oct 2013 22:27:47 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel , Linus Walleij , Shubhrajyoti Datta , Carlos Chinea , Paul Walmsley Cc: Kevin Hilman , Tony Lindgren , Russell King , Grant Likely , Rob Herring , Pawel Moll , Mark Rutland , Stephen Warren , Ian Campbell , Rob Landley , =?UTF-8?q?=27Beno=C3=AEt=20Cousson=27?= , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, =?UTF-8?q?=27Pali=20Roh=C3=A1r=27?= , =?UTF-8?q?=27=D0=98=D0=B2=D0=B0=D0=B9=D0=BB=D0=BE=20=D0=94=D0=B8=D0=BC=D0=B8=D1=82=D1=80=D0=BE=D0=B2=27?= , Joni Lapilainen , Sebastian Reichel Subject: [RFCv3 4/7] HSI: hsi-char: add Device Tree support Date: Sun, 6 Oct 2013 22:27:12 +0200 Message-Id: <1381091235-18293-5-git-send-email-sre@debian.org> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1381091235-18293-1-git-send-email-sre@debian.org> References: <1381091235-18293-1-git-send-email-sre@debian.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add of_match_table to hsi_char driver, so that it can be referenced from Device Tree. Signed-off-by: Sebastian Reichel --- drivers/hsi/clients/hsi_char.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c index e61e5f9..e3302ed 100644 --- a/drivers/hsi/clients/hsi_char.c +++ b/drivers/hsi/clients/hsi_char.c @@ -42,6 +42,7 @@ #include #include #include +#include #define HSC_DEVS 16 /* Num of channels */ #define HSC_MSGS 4 @@ -758,12 +759,24 @@ static int hsc_remove(struct device *dev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id hsi_char_of_match[] = { + { .compatible = "ssi-char", }, + { .compatible = "hsi-char", }, + {}, +}; +MODULE_DEVICE_TABLE(of, hsi_char_of_match); +#else +#define hsi_char_of_match NULL +#endif + static struct hsi_client_driver hsc_driver = { .driver = { .name = "hsi_char", .owner = THIS_MODULE, .probe = hsc_probe, .remove = hsc_remove, + .of_match_table = hsi_char_of_match, }, };