From patchwork Sun Aug 6 06:48:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9883517 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 9BFAE6031B for ; Sun, 6 Aug 2017 06:50:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C9D027A98 for ; Sun, 6 Aug 2017 06:50:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 817992864F; Sun, 6 Aug 2017 06:50:34 +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=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D71C02866B for ; Sun, 6 Aug 2017 06:50:33 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C7A87266D22; Sun, 6 Aug 2017 08:49:32 +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 CE31A266D22; Sun, 6 Aug 2017 08:49:29 +0200 (CEST) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by alsa0.perex.cz (Postfix) with ESMTP id E8F42266D11 for ; Sun, 6 Aug 2017 08:49:23 +0200 (CEST) Received: by mail-pf0-f193.google.com with SMTP id j68so5950739pfc.2 for ; Sat, 05 Aug 2017 23:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=c64nKOxsVZv3JZwpbjIxlsUcWtRXk1dPdsH7wJXV3Kg=; b=OHueUTjIQEngBpIDx2UNwqg6Gn42S32AFhZtvAX9m1NkJ2XKVhpQlsUqKkR355TSDb 5N8eVZtC1s5jgDExuv3NPA3ypHaOuVdpWUZfEf6MBBI5OkmapWusDS59IjmSUP+0veob hVXGfJxybmhmxWicuNzMboYgK6/4yU+74dYnsmdNjz7A4UGQ2mF83zaCzP6FVlHIeOq/ VKY1ah3bWVIUxR+a06FywIDFig0KCSiQwYy4LjqpN4xsA/d3sD3974X1Ee4bPeHxzIJT yWVarXo2fWrdO2/M/aSyR4ICLIDYP2oYeRszjhwgNXAXbnAijHIHqginiPKftx36BsX1 q/uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=c64nKOxsVZv3JZwpbjIxlsUcWtRXk1dPdsH7wJXV3Kg=; b=sLr78UBXr8eJv+qZ5t4Df3V6nGeSgdhysQNodwlCjmxqfbiOck1ZDJNjWU+f9HoS9r MiWY1MkDTKVqs2tsIgKV6OZz3HoeSaZetnBhIzjyBSX8uo0Xyud6O++VwnmRDmc/wHa+ n4hwBG7i5RWzgs57BVykOAu/6mIU26mld84Us2XVpoWgc3aF24MNPkdfEDmnY4f1FSts pKlBsGQquNKTldQ8aiEJWjC9/OEbdiWl1fJrLhIK2jSez8nu1W9uBABR0FDRyfmoHhGC XcxRhcExc1D6/K/+LiCWI67YsT88zUd0G3m6WWmgJWD+1cRlxl0QxpZMl3qKYJI2xR4H 6L0Q== X-Gm-Message-State: AIVw112xd9EH6Bo1+htPhc1K6JxCHQBpDk74cLd2MW/EUWMcH/h9nABN JfkysWFwk8T2Lw== X-Received: by 10.98.29.73 with SMTP id d70mr7826016pfd.8.1502002162538; Sat, 05 Aug 2017 23:49:22 -0700 (PDT) Received: from localhost.localdomain ([103.16.68.81]) by smtp.gmail.com with ESMTPSA id r8sm10508524pfl.34.2017.08.05.23.49.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 05 Aug 2017 23:49:22 -0700 (PDT) From: Arvind Yadav To: perex@perex.cz, tiwai@suse.com, zonque@gmail.com, clemens@ladisch.de Date: Sun, 6 Aug 2017 12:18:56 +0530 Message-Id: <1502002139-10787-5-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502002139-10787-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1502002139-10787-1-git-send-email-arvind.yadav.cs@gmail.com> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH 4/7] ALSA: usb-audio: constify usb_device_id. 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 usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- sound/usb/card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/usb/card.c b/sound/usb/card.c index 6640277..3dc36d9 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -486,7 +486,7 @@ static bool get_alias_id(struct usb_device *dev, unsigned int *id) return false; } -static struct usb_device_id usb_audio_ids[]; /* defined below */ +static const struct usb_device_id usb_audio_ids[]; /* defined below */ /* look for the corresponding quirk */ static const struct snd_usb_audio_quirk * @@ -814,7 +814,7 @@ static int usb_audio_reset_resume(struct usb_interface *intf) #define usb_audio_reset_resume NULL #endif /* CONFIG_PM */ -static struct usb_device_id usb_audio_ids [] = { +static const struct usb_device_id usb_audio_ids [] = { #include "quirks-table.h" { .match_flags = (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS), .bInterfaceClass = USB_CLASS_AUDIO,