diff options
author | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-08-10 21:51:01 -0400 |
---|---|---|
committer | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-08-10 21:51:01 -0400 |
commit | 84b86128572d1cef2f921fda840e365d8f01bdee (patch) | |
tree | c194ef18f173ae7b2da25b643912c798bf6bcbd6 /linux/drivers/media/dvb/frontends/or51211.c | |
parent | 01f3c89fa61131e3a5744fefcedba6b8bef882c1 (diff) | |
download | mediapointer-dvb-s2-84b86128572d1cef2f921fda840e365d8f01bdee.tar.gz mediapointer-dvb-s2-84b86128572d1cef2f921fda840e365d8f01bdee.tar.bz2 |
Use kzalloc for frontend states to have struct dvb_frontend properly
From: Matthias Schwarzott <zzam@gentoo.org>
This patch changes most frontend drivers to allocate their state structure via
kzalloc and not kmalloc. This is done to properly initialize the
embedded "struct dvb_frontend frontend" field, that they all have.
The visible effect of this struct being uninitalized is, that the member "id"
that is used to set the name of kernel thread is totally random.
Some board drivers (for example cx88-dvb) set this "id" via
videobuf_dvb_alloc_frontend but most do not.
So I at least get random id values for saa7134, flexcop and ttpci based cards.
It looks like this in dmesg:
DVB: registering adapter 1 frontend -10551321 (ST STV0299 DVB-S)
The related kernel thread then also gets a strange name
like "kdvb-ad-1-fe--1".
Priority: normal
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
CC: Michael Krufky <mkrufky@linuxtv.org>
CC: Steven Toth <stoth@linuxtv.org>
CC: Timothy Lee <timothy.lee@siriushk.com>
CC: Igor M. Liplianin <liplianin@me.by>
Acked-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/or51211.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/or51211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/or51211.c b/linux/drivers/media/dvb/frontends/or51211.c index 16cf2fdd5..c709ce677 100644 --- a/linux/drivers/media/dvb/frontends/or51211.c +++ b/linux/drivers/media/dvb/frontends/or51211.c @@ -527,7 +527,7 @@ struct dvb_frontend* or51211_attach(const struct or51211_config* config, struct or51211_state* state = NULL; /* Allocate memory for the internal state */ - state = kmalloc(sizeof(struct or51211_state), GFP_KERNEL); + state = kzalloc(sizeof(struct or51211_state), GFP_KERNEL); if (state == NULL) return NULL; |