[PATCH] vgaarb: fix trylock behaviour accordingly vga_tryget return value

From: Tiago Vignatti
Date: Tue Jan 12 2010 - 13:13:44 EST


From: Henry Zhao <Henry.Zhao@xxxxxxx>

Signed-off-by: Tiago Vignatti <tiago.vignatti@xxxxxxxxx>
---
Henry, can you Signed-off-by there?

drivers/gpu/vga/vgaarb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
index 2f6cf69..0f5f64d 100644
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -935,7 +935,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
goto done;
}

- if (vga_tryget(pdev, io_state)) {
+ if (!vga_tryget(pdev, io_state)) {
/* Update the client's locks lists... */
for (i = 0; i < MAX_USER_CARDS; i++) {
if (priv->cards[i].pdev == pdev) {
--
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/