From patchwork Thu May 22 15:08:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit Taine X-Patchwork-Id: 4224031 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@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 5F6919F23C for ; Thu, 22 May 2014 15:48:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2C032037D for ; Thu, 22 May 2014 15:48:41 +0000 (UTC) Received: from alsa0.perex.cz (unknown [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7C76A201CE for ; Thu, 22 May 2014 15:48:40 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 542F226565B; Thu, 22 May 2014 17:48:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 2FD522654B3; Thu, 22 May 2014 17:46:29 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id E1CCC2655F9; Thu, 22 May 2014 17:08:26 +0200 (CEST) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) by alsa0.perex.cz (Postfix) with ESMTP id 6B8EF2655DE for ; Thu, 22 May 2014 17:08:10 +0200 (CEST) Received: from systeme.lip6.fr (systeme.lip6.fr [132.227.104.7]) by isis.lip6.fr (8.14.7/lip6) with ESMTP id s4MF87C1021589 ; Thu, 22 May 2014 17:08:07 +0200 (CEST) X-pt: isis.lip6.fr Received: from hermod.lip6.fr (samsung-benoit.rsr.lip6.fr [132.227.76.49]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by systeme.lip6.fr (Postfix) with ESMTPSA id AFA8B42D6; Thu, 22 May 2014 17:08:07 +0200 (CEST) From: Benoit Taine To: Jaroslav Kysela Date: Thu, 22 May 2014 17:08:54 +0200 Message-Id: <1400771334-25112-1-git-send-email-benoit.taine@lip6.fr> X-Mailer: git-send-email 1.9.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Thu, 22 May 2014 17:08:08 +0200 (CEST) X-Scanned-By: MIMEDefang 2.74 on 132.227.60.2 X-Mailman-Approved-At: Thu, 22 May 2014 17:46:25 +0200 Cc: Takashi Iwai , benoit.taine@lip6.fr, alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ALSA: Replace DEFINE_PCI_DEVICE_TABLE macro use X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP We should prefer `const struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // It has been tested by compilation. Signed-off-by: Benoit Taine --- sound/pci/hda/hda_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 2c54629..ab0fd6d 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1730,7 +1730,7 @@ static void azx_remove(struct pci_dev *pci) } /* PCI IDs */ -static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { +static const struct pci_device_id azx_ids[] = { /* CPT */ { PCI_DEVICE(0x8086, 0x1c20), .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM },