diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2018-04-10 16:21:43 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-02 01:13:08 +0300 |
commit | a4e38e8dd596a3e03eeffb55df4aab27acd5eb2d (patch) | |
tree | fe39324b64504820cdf8773c07bd0b1df929bfed /drivers/amba | |
parent | 5b066d6423b23fd95334184f721b94f8b61f7d21 (diff) | |
download | linux-a4e38e8dd596a3e03eeffb55df4aab27acd5eb2d.tar.xz |
ARM: amba: Make driver_override output consistent with other buses
commit 5f53624662eaac89598641cee6cd54fc192572d9 upstream.
For AMBA devices with unconfigured driver override, the
"driver_override" sysfs virtual file is empty, while it contains
"(null)" for platform and PCI devices.
Make AMBA consistent with other buses by dropping the test for a NULL
pointer.
Note that contrary to popular belief, sprintf() handles NULL pointers
fine; they are printed as "(null)".
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/amba')
-rw-r--r-- | drivers/amba/bus.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index a56fa2a1e9aa..b8642519fc92 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -70,9 +70,6 @@ static ssize_t driver_override_show(struct device *_dev, { struct amba_device *dev = to_amba_device(_dev); - if (!dev->driver_override) - return 0; - return sprintf(buf, "%s\n", dev->driver_override); } |