PCI: add pci_try_set_mwi

As suggested by Andrew, add pci_try_set_mwi(), which does not require
return-value checking.

- add pci_try_set_mwi() without __must_check
- make it return 0 on success, errno if the "try" failed or error
- review callers

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Randy Dunlap
2007-07-09 11:55:54 -07:00
committed by Greg Kroah-Hartman
부모 f5609d7e67
커밋 694625c0b3
11개의 변경된 파일38개의 추가작업 그리고 18개의 파일을 삭제

파일 보기

@@ -166,8 +166,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
pci_set_master(pdev);
/* enable MWI */
if (!pci_set_mwi(pdev))
printk(KERN_INFO "%s: pci_set_mwi(pdev) succeeded\n", DRV_NAME);
pci_try_set_mwi(pdev);
/* setup the network device interface and its structure */
if (!(ndev = islpci_setup(pdev))) {