From: "Jasmin J." <jasmin@anw.at>
To: linux-media@vger.kernel.org
Cc: mchehab@s-opensource.com, rjkm@metzlerbros.de,
d.scheller@gmx.net, jasmin@anw.at
Subject: [PATCH V2 1/3] media: dvb-core: Store device structure in dvb_register_device
Date: Thu, 21 Dec 2017 13:22:37 +0000 [thread overview]
Message-ID: <1513862559-19725-2-git-send-email-jasmin@anw.at> (raw)
In-Reply-To: <1513862559-19725-1-git-send-email-jasmin@anw.at>
From: Jasmin Jessich <jasmin@anw.at>
The device created by device_create in dvb_register_device was not
available for DVB device drivers.
Added "struct device *dev" to "struct dvb_device" and store the created
device.
Signed-off-by: Jasmin Jessich <jasmin@anw.at>
Acked-by: Ralph Metzler <rjkm@metzlerbros.de>
---
drivers/media/dvb-core/dvbdev.c | 1 +
drivers/media/dvb-core/dvbdev.h | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 060c60d..f55eff1 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -538,6 +538,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
__func__, adap->num, dnames[type], id, PTR_ERR(clsdev));
return PTR_ERR(clsdev);
}
+ dvbdev->dev = clsdev;
dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n",
adap->num, dnames[type], id, minor, minor);
diff --git a/drivers/media/dvb-core/dvbdev.h b/drivers/media/dvb-core/dvbdev.h
index bbc1c20..1f2d2ff 100644
--- a/drivers/media/dvb-core/dvbdev.h
+++ b/drivers/media/dvb-core/dvbdev.h
@@ -147,10 +147,11 @@ struct dvb_adapter {
* @tsout_num_entities: Number of Transport Stream output entities
* @tsout_entity: array with MC entities associated to each TS output node
* @tsout_pads: array with the source pads for each @tsout_entity
+ * @dev: pointer to struct device that is associated with the dvb device
*
* This structure is used by the DVB core (frontend, CA, net, demux) in
* order to create the device nodes. Usually, driver should not initialize
- * this struct diretly.
+ * this struct directly.
*/
struct dvb_device {
struct list_head list_head;
@@ -183,6 +184,7 @@ struct dvb_device {
#endif
void *priv;
+ struct device *dev;
};
/**
--
2.7.4
next prev parent reply other threads:[~2017-12-21 12:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 13:22 [PATCH V2 0/3] Add timers to en50221 protocol driver Jasmin J.
2017-12-21 13:22 ` Jasmin J. [this message]
2018-02-13 23:29 ` [PATCH V2 1/3] media: dvb-core: Store device structure in dvb_register_device Jasmin J.
2017-12-21 13:22 ` [PATCH V2 2/3] media: dvb-core: Added timers for dvb_ca_en50221_write_data Jasmin J.
2018-02-13 23:29 ` Jasmin J.
2018-03-05 20:03 ` Mauro Carvalho Chehab
2017-12-21 13:22 ` [PATCH V2 3/3] media: dvb-core: Added documentation for ca sysfs timer nodes Jasmin J.
2018-02-13 23:29 ` Jasmin J.
2018-02-13 23:29 ` [PATCH V2 0/3] Add timers to en50221 protocol driver Jasmin J.
2018-02-18 20:55 ` Ralph Metzler
2018-02-18 21:18 ` Jasmin J.
2018-02-19 0:24 ` Ralph Metzler
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=1513862559-19725-2-git-send-email-jasmin@anw.at \
--to=jasmin@anw.at \
--cc=d.scheller@gmx.net \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@s-opensource.com \
--cc=rjkm@metzlerbros.de \
/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).