]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PCI: return correct value when writing to the "reset" attribute
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 11 May 2010 09:44:54 +0000 (11:44 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 28 Mar 2011 14:31:20 +0000 (07:31 -0700)
commitb4fa91e269852b62a3b4e53520a367b8968a06cd
treea0a0d39e48fcd52279c2276b4e2a86a5ef6c81a4
parent92fdffe127c10547ae21d7814c59620b79d15a0d
PCI: return correct value when writing to the "reset" attribute

commit 447c5dd7338638f526e9bcf7dcf69b4da5835c7d upstream.

A successful write() to the "reset" sysfs attribute should return the
number of bytes written, not 0. Otherwise userspace (bash) retries the
write over and over again.

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/pci-sysfs.c