Skip to content

Commit ec46bf9

Browse files
hkallweitdavem330
authored andcommitted
sound: bt87x: use pci_status_get_and_clear_errors
Use new helper pci_status_get_and_clear_errors() to simplify the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 75e1fd4 commit ec46bf9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

sound/pci/bt87x.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,13 +271,8 @@ static void snd_bt87x_free_risc(struct snd_bt87x *chip)
271271

272272
static void snd_bt87x_pci_error(struct snd_bt87x *chip, unsigned int status)
273273
{
274-
u16 pci_status;
274+
int pci_status = pci_status_get_and_clear_errors(chip->pci);
275275

276-
pci_read_config_word(chip->pci, PCI_STATUS, &pci_status);
277-
pci_status &= PCI_STATUS_PARITY | PCI_STATUS_SIG_TARGET_ABORT |
278-
PCI_STATUS_REC_TARGET_ABORT | PCI_STATUS_REC_MASTER_ABORT |
279-
PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY;
280-
pci_write_config_word(chip->pci, PCI_STATUS, pci_status);
281276
if (pci_status != PCI_STATUS_DETECTED_PARITY)
282277
dev_err(chip->card->dev,
283278
"Aieee - PCI error! status %#08x, PCI status %#04x\n",

0 commit comments

Comments
 (0)