Skip to content

Commit 5f53624

Browse files
geertugregkh
authored andcommitted
ARM: amba: Make driver_override output consistent with other buses
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>
1 parent 2891d4f commit 5f53624

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎drivers/amba/bus.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ static ssize_t driver_override_show(struct device *_dev,
7070
{
7171
struct amba_device *dev = to_amba_device(_dev);
7272

73-
if (!dev->driver_override)
74-
return 0;
75-
7673
return sprintf(buf, "%s\n", dev->driver_override);
7774
}
7875

0 commit comments

Comments
 (0)