mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
gpiolib: clean up debugfs separator handling
Add the newline separator before generating the gpio chip entry to make the code easier to read. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241028125000.24051-4-johan+linaro@kernel.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
a7a86fe18b
commit
b9b7e4a67d
@ -5075,19 +5075,19 @@ static int gpiolib_seq_show(struct seq_file *s, void *v)
|
||||
struct gpio_chip *gc;
|
||||
struct device *parent;
|
||||
|
||||
if (priv->newline)
|
||||
seq_putc(s, '\n');
|
||||
|
||||
guard(srcu)(&gdev->srcu);
|
||||
|
||||
gc = srcu_dereference(gdev->chip, &gdev->srcu);
|
||||
if (!gc) {
|
||||
seq_printf(s, "%s%s: (dangling chip)\n",
|
||||
priv->newline ? "\n" : "",
|
||||
dev_name(&gdev->dev));
|
||||
seq_printf(s, "%s: (dangling chip)\n", dev_name(&gdev->dev));
|
||||
return 0;
|
||||
}
|
||||
|
||||
seq_printf(s, "%s%s: GPIOs %u-%u", priv->newline ? "\n" : "",
|
||||
dev_name(&gdev->dev),
|
||||
gdev->base, gdev->base + gdev->ngpio - 1);
|
||||
seq_printf(s, "%s: GPIOs %u-%u", dev_name(&gdev->dev), gdev->base,
|
||||
gdev->base + gdev->ngpio - 1);
|
||||
parent = gc->parent;
|
||||
if (parent)
|
||||
seq_printf(s, ", parent: %s/%s",
|
||||
|
Loading…
Reference in New Issue
Block a user