From: "Enrico Weigelt, metux IT consult" <info@metux.net>
To: linux-kernel@vger.kernel.org
Cc: axboe@kernel.dk, linux-ide@vger.kernel.org
Subject: [PATCH v2 1/2] drivers: libata: introduce sysctl directory
Date: Wed, 5 Jun 2019 13:36:26 +0200 [thread overview]
Message-ID: <1559734587-32596-2-git-send-email-info@metux.net> (raw)
In-Reply-To: <1559734587-32596-1-git-send-email-info@metux.net>
Register a sysctl directory for libata, so upcoming knobs
can be added here.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
drivers/ata/libata-core.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index aaa57e0..2af2470 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -160,6 +160,21 @@ struct ata_force_ent {
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
+static struct ctl_table ctl_libata[] = {
+ {}
+};
+
+static struct ctl_table libata_dir_table[] = {
+ {
+ .procname = "libata",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = ctl_libata,
+ },
+ { },
+};
+
+static struct ctl_table_header *libata_sysctl_header;
static bool ata_sstatus_online(u32 sstatus)
{
@@ -7043,6 +7058,8 @@ static int __init ata_init(void)
goto err_out;
}
+ libata_sysctl_header = register_sysctl_table(libata_dir_table);
+
printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n");
return 0;
@@ -7056,6 +7073,7 @@ static void __exit ata_exit(void)
libata_transport_exit();
ata_sff_exit();
kfree(ata_force_tbl);
+ unregister_sysctl_table(libata_sysctl_header);
}
subsys_initcall(ata_init);
--
1.9.1
next prev parent reply other threads:[~2019-06-05 11:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 11:36 libata: sysctl knob for enabling tpm/opal at runtime Enrico Weigelt, metux IT consult
2019-06-05 11:36 ` Enrico Weigelt, metux IT consult [this message]
2019-06-05 11:36 ` [PATCH v2 2/2] drivers: libata: add sysctl: 'libata.allow_tpm' for self-encrypted devices Enrico Weigelt, metux IT consult
2019-06-05 19:23 ` libata: sysctl knob for enabling tpm/opal at runtime Christoph Hellwig
2019-06-06 14:20 ` Enrico Weigelt, metux IT consult
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=1559734587-32596-2-git-send-email-info@metux.net \
--to=info@metux.net \
--cc=axboe@kernel.dk \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).