From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>,
linux-kernel@vger.kernel.org,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: [GIT PULL v1 3/7] intel_th: Only create useful device nodes
Date: Thu, 21 Feb 2019 17:50:02 +0200 [thread overview]
Message-ID: <20190221155006.76832-4-alexander.shishkin@linux.intel.com> (raw)
In-Reply-To: <20190221155006.76832-1-alexander.shishkin@linux.intel.com>
Right now, the driver will create a device node for each output port,
with the intent to provide read access to that port's data. However,
only the memory ports are readable this way (msc0, msc1). Other output
ports don't need device nodes, so remove them.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
---
drivers/hwtracing/intel_th/core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
index fc6b7f8b62fb..7c1acc2f801c 100644
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -422,6 +422,7 @@ static const struct intel_th_subdevice {
unsigned nres;
unsigned type;
unsigned otype;
+ bool mknode;
unsigned scrpd;
int id;
} intel_th_subdevices[] = {
@@ -456,6 +457,7 @@ static const struct intel_th_subdevice {
.name = "msc",
.id = 0,
.type = INTEL_TH_OUTPUT,
+ .mknode = true,
.otype = GTH_MSU,
.scrpd = SCRPD_MEM_IS_PRIM_DEST | SCRPD_MSC0_IS_ENABLED,
},
@@ -476,6 +478,7 @@ static const struct intel_th_subdevice {
.name = "msc",
.id = 1,
.type = INTEL_TH_OUTPUT,
+ .mknode = true,
.otype = GTH_MSU,
.scrpd = SCRPD_MEM_IS_PRIM_DEST | SCRPD_MSC1_IS_ENABLED,
},
@@ -635,7 +638,8 @@ intel_th_subdevice_alloc(struct intel_th *th,
}
if (subdev->type == INTEL_TH_OUTPUT) {
- thdev->dev.devt = MKDEV(th->major, th->num_thdevs);
+ if (subdev->mknode)
+ thdev->dev.devt = MKDEV(th->major, th->num_thdevs);
thdev->output.type = subdev->otype;
thdev->output.port = -1;
thdev->output.scratchpad = subdev->scrpd;
--
2.20.1
next prev parent reply other threads:[~2019-02-21 15:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 15:49 [GIT PULL v1 0/7] stm class/intel_th: Updates for v5.1 Alexander Shishkin
2019-02-21 15:50 ` [GIT PULL v1 1/7] intel_th: Update ABI documentation Alexander Shishkin
2019-02-21 15:50 ` [GIT PULL v1 2/7] intel_th: Mark expected switch fall-throughs Alexander Shishkin
2019-02-21 15:50 ` Alexander Shishkin [this message]
2019-02-21 15:50 ` [GIT PULL v1 4/7] intel_th: pti: Use sysfs_match_string() helper Alexander Shishkin
2019-02-21 15:50 ` [GIT PULL v1 5/7] intel_th: Don't reference unassigned outputs Alexander Shishkin
2019-02-21 15:50 ` [GIT PULL v1 6/7] stm class: Fix an endless loop in channel allocation Alexander Shishkin
2019-02-21 15:50 ` [GIT PULL v1 7/7] stm class: Prevent division by zero Alexander Shishkin
2019-02-21 16:13 ` [GIT PULL v1 0/7] stm class/intel_th: Updates for v5.1 Greg Kroah-Hartman
2019-03-01 8:12 ` Alexander Shishkin
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=20190221155006.76832-4-alexander.shishkin@linux.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.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