From patchwork Fri Jul 17 05:46:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaishali Thakkar X-Patchwork-Id: 6813061 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4729EC05AC for ; Fri, 17 Jul 2015 05:47:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6E48920616 for ; Fri, 17 Jul 2015 05:47:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E45120588 for ; Fri, 17 Jul 2015 05:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752674AbbGQFqu (ORCPT ); Fri, 17 Jul 2015 01:46:50 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:35354 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752216AbbGQFqu (ORCPT ); Fri, 17 Jul 2015 01:46:50 -0400 Received: by pdrg1 with SMTP id g1so56114984pdr.2; Thu, 16 Jul 2015 22:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=KlKuBQ3HL3xZ5mAyDNHZLuKhrx2M8tOfsZtowTLM348=; b=wLj29Ujqr5xYLakCGuZ0hsrkrKkq7VYyQdj7G2UZXoTSxvfhiFLDHbZ2Ivn0uYryoS fQy+gKYC7zMNq82RP54HByoY3et8T8QW8Q1uNR/bIUhHW9VV03eeaWcryGqh7mxy8Bsg NCO5+pmVW0FqBI/LQZFXeaLE0yJMRZYNp/emed+unimFEqOOz+oCA/D6yrCxgLnxdyM6 ydJBmFsT6ydpWScJe1wbbykuoIy9YLQ3b8e/7DIJepdtiGwTeCFDE3mPBAJo2U61eJeZ Nnj8mx6Na1tKoRW5eKt2wtl0iMl7A6xPjax7YulsRmHi85WnIyHG1i5r2PWOuBUTrdWa xIGg== X-Received: by 10.68.88.33 with SMTP id bd1mr26321232pbb.124.1437112009655; Thu, 16 Jul 2015 22:46:49 -0700 (PDT) Received: from vaishali-Ideapad-Z570 ([43.249.235.109]) by smtp.gmail.com with ESMTPSA id b10sm9784853pdo.84.2015.07.16.22.46.47 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Jul 2015 22:46:48 -0700 (PDT) Date: Fri, 17 Jul 2015 11:16:43 +0530 From: Vaishali Thakkar To: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] wd719x: Remove use of macro DEFINE_PCI_DEVICE_TABLE Message-ID: <20150717054643.GA7209@vaishali-Ideapad-Z570> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Macro DEFINE_PCI_DEVICE_TABLE is deprecated. So, here use struct pci_device_id instead of DEFINE_PCI_DEVICE_TABLE with the goal of getting rid of this macro completely. The Coccinelle semantic patch that performs this transformation is as follows: @@ identifier a; declarer name DEFINE_PCI_DEVICE_TABLE; initializer i; @@ - DEFINE_PCI_DEVICE_TABLE(a) + const struct pci_device_id a[] = i; Signed-off-by: Vaishali Thakkar --- This patch is against linux-next branch --- drivers/scsi/wd719x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c index 61346aa..4655d16 100644 --- a/drivers/scsi/wd719x.c +++ b/drivers/scsi/wd719x.c @@ -962,7 +962,7 @@ static void wd719x_pci_remove(struct pci_dev *pdev) scsi_host_put(sh); } -static DEFINE_PCI_DEVICE_TABLE(wd719x_pci_table) = { +static const struct pci_device_id wd719x_pci_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_WD, 0x3296) }, {} };