From: Linas Vepstas Date: Mon, 10 Jul 2006 11:44:46 +0000 (-0700) Subject: [PATCH] pci: initialize struct pci_dev.error_state X-Git-Tag: v2.6.18-rc2~185 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82081797b7d72108a47c82997349d1ea6a3eb3d5;p=pandora-kernel.git [PATCH] pci: initialize struct pci_dev.error_state The pci channel state is currently uninitialized, thus there are two ways of indicating that "everything's OK": 0 and 1. This is a bit of a burden. If a devce driver wants to check if the pci channel is in a working or a disconnected state, the driver writer must perform checks similar to if((pdev->error_state != 0) && (pdev->error_state != pci_channel_io_normal)) { whatever(); } which is rather akward. The first check is needed because stuct pci_dev is inited to all-zeros. The scond is needed because the error recovery will set the state to pci_channel_io_normal (which is not zero). This patch fixes this awkwardness. Signed-off-by: Linas Vepstas Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed