From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: linux-tegra@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v1 1/3] gpio: tegra: Use debugfs_create_devm_seqfile()
Date: Fri, 22 Jan 2021 21:55:41 +0300 [thread overview]
Message-ID: <20210122185543.16554-2-digetx@gmail.com> (raw)
In-Reply-To: <20210122185543.16554-1-digetx@gmail.com>
Use resource-managed variant of debugfs_create_file(0444) to prepare code
for the modularization of the driver.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
drivers/gpio/gpio-tegra.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 9a43129313fa..06f033375e40 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -605,7 +605,7 @@ static void tegra_gpio_irq_release_resources(struct irq_data *d)
static int tegra_dbg_gpio_show(struct seq_file *s, void *unused)
{
- struct tegra_gpio_info *tgi = s->private;
+ struct tegra_gpio_info *tgi = dev_get_drvdata(s->private);
unsigned int i, j;
for (i = 0; i < tgi->bank_count; i++) {
@@ -627,12 +627,10 @@ static int tegra_dbg_gpio_show(struct seq_file *s, void *unused)
return 0;
}
-DEFINE_SHOW_ATTRIBUTE(tegra_dbg_gpio);
-
static void tegra_gpio_debuginit(struct tegra_gpio_info *tgi)
{
- debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
- &tegra_dbg_gpio_fops);
+ debugfs_create_devm_seqfile(tgi->dev, "tegra_gpio", NULL,
+ tegra_dbg_gpio_show);
}
#else
--
2.29.2
next prev parent reply other threads:[~2021-01-22 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 18:55 [PATCH v1 0/3] Support building gpio-tegra driver as loadable module Dmitry Osipenko
2021-01-22 18:55 ` Dmitry Osipenko [this message]
2021-01-22 18:55 ` [PATCH v1 2/3] gpio: tegra: Clean up whitespaces in tegra_gpio_driver Dmitry Osipenko
2021-01-22 18:55 ` [PATCH v1 3/3] gpio: tegra: Support building driver as a loadable module Dmitry Osipenko
2021-01-23 22:50 ` [PATCH v1 0/3] Support building gpio-tegra driver as " Linus Walleij
2021-01-23 23:56 ` Dmitry Osipenko
2021-01-24 22:46 ` Linus Walleij
2021-01-25 14:08 ` Dmitry Osipenko
2021-01-27 14:41 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210122185543.16554-2-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).