diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-09-16 17:24:00 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-10-20 17:51:40 +0300 |
commit | f92d155d3eb05e74380383450eb86ba995c8d766 (patch) | |
tree | 85b0533d9093b38dbc315f89e5715e7d46c75231 /drivers/i2c | |
parent | fb8918b2cf8741eef3972cbe70ab5dabd6ff67e7 (diff) | |
download | linux-f92d155d3eb05e74380383450eb86ba995c8d766.tar.xz |
i2c: ismt: do not duplicate msi_enabled flag
struct pci_dev already has a flag to track if MSI is enabled or not. Use it
directly.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-ismt.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c index 3889e6b4176d..3cc20f35ae8a 100644 --- a/drivers/i2c/busses/i2c-ismt.c +++ b/drivers/i2c/busses/i2c-ismt.c @@ -172,7 +172,6 @@ struct ismt_priv { u8 head; /* ring buffer head pointer */ struct completion cmp; /* interrupt completion */ u8 dma_buffer[I2C_SMBUS_BLOCK_MAX + 1]; /* temp R/W data buffer */ - bool using_msi; /* type of interrupt flag */ }; /** @@ -398,7 +397,7 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr, desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, read_write); /* Initialize common control bits */ - if (likely(priv->using_msi)) + if (likely(pci_dev_msi_enabled(priv->pci_dev))) desc->control = ISMT_DESC_INT | ISMT_DESC_FAIR; else desc->control = ISMT_DESC_FAIR; @@ -806,7 +805,6 @@ static int ismt_int_init(struct ismt_priv *priv) goto intx; } - priv->using_msi = true; goto done; /* Try using legacy interrupts */ @@ -822,8 +820,6 @@ intx: return -ENODEV; } - priv->using_msi = false; - done: return 0; } |