From patchwork Tue Feb 21 13:07:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Glauber X-Patchwork-Id: 730531 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vSLQx6j5xz9s4s for ; Wed, 22 Feb 2017 00:08:25 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753143AbdBUNIS (ORCPT ); Tue, 21 Feb 2017 08:08:18 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34874 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752911AbdBUNIP (ORCPT ); Tue, 21 Feb 2017 08:08:15 -0500 Received: by mail-wr0-f193.google.com with SMTP id q39so15135291wrb.2; Tue, 21 Feb 2017 05:08:14 -0800 (PST) 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; bh=g8LrQAiGwE2RC6XxrZ+mFCEAXd60FO+FViOgZdP1WUc=; b=n6HH1Srt8kdjkschCous5o1MK5PTBhU7eY3PvjndO24Nlilyp4I4jvZbrScXL+eqpz j12lGLgtH8F4aB9oCRk5pZlN2Nd4XzKiRRtgo0BoZRZ2UjOJgR5nb0eS0HPpFwonq0rm VbQfnQpGQ9tk2GyqiWbHuLZUul4BGEJGPbEBHpMJ1DmH07LDJs7XUYcmeo8hqYEKOU7N 0rZDjbREPBbvpAX6PrdkSIfJnuWwMeeEgE1wK2IxCzEa5Buf0GdQdTIeXzgpjWhYE0GS xhYWca5Kz4EJ2oqgfsoRw7HVNv97p1Y1sMgheS/aWRLbgF4HYwb7gzdOnKeC+l0+trqp cZtA== X-Gm-Message-State: AMke39nSLRpCKbuuuB6ofJ/DEygfBh+xIbt9F5jV0MZH8mHZgT8GIVzoDDJyOf8yztf6Ag== X-Received: by 10.223.141.148 with SMTP id o20mr19615535wrb.191.1487682488460; Tue, 21 Feb 2017 05:08:08 -0800 (PST) Received: from localhost.localdomain (dslb-088-066-105-003.088.066.pools.vodafone-ip.de. [88.66.105.3]) by smtp.gmail.com with ESMTPSA id e6sm28870480wrc.30.2017.02.21.05.08.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Feb 2017 05:08:07 -0800 (PST) From: Jan Glauber To: Wolfram Sang Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Jan Glauber Subject: [PATCH] i2c: thunderx: Replace pci_enable_msix() Date: Tue, 21 Feb 2017 14:07:50 +0100 Message-Id: <20170221130750.32277-1-jglauber@cavium.com> X-Mailer: git-send-email 2.9.0.rc0.21.g7777322 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Using pci_alloc_irq_vectors() instead of the deprecated pci_enable_msix() allows to remove the msix_entry from struct octeon_i2c and thus to get rid of the config symbol check. Signed-off-by: Jan Glauber --- drivers/i2c/busses/i2c-octeon-core.h | 4 ---- drivers/i2c/busses/i2c-thunderx-pcidrv.c | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-octeon-core.h b/drivers/i2c/busses/i2c-octeon-core.h index e160f83..aa3c8f4 100644 --- a/drivers/i2c/busses/i2c-octeon-core.h +++ b/drivers/i2c/busses/i2c-octeon-core.h @@ -6,7 +6,6 @@ #include #include #include -#include /* Controller command patterns */ #define SW_TWSI_V BIT_ULL(63) /* Valid bit */ @@ -118,9 +117,6 @@ struct octeon_i2c { void (*hlc_int_disable)(struct octeon_i2c *); atomic_t int_enable_cnt; atomic_t hlc_int_enable_cnt; -#if IS_ENABLED(CONFIG_I2C_THUNDERX) - struct msix_entry i2c_msix; -#endif struct i2c_smbus_alert_setup alert_data; struct i2c_client *ara; }; diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c index bba5b42..1d4c2be 100644 --- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c +++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c @@ -188,11 +188,11 @@ static int thunder_i2c_probe_pci(struct pci_dev *pdev, i2c->hlc_int_enable = thunder_i2c_hlc_int_enable; i2c->hlc_int_disable = thunder_i2c_hlc_int_disable; - ret = pci_enable_msix(pdev, &i2c->i2c_msix, 1); - if (ret) + ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSIX); + if (ret < 0) goto error; - ret = devm_request_irq(dev, i2c->i2c_msix.vector, octeon_i2c_isr, 0, + ret = devm_request_irq(dev, pci_irq_vector(pdev, 0), octeon_i2c_isr, 0, DRV_NAME, i2c); if (ret) goto error;