aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-02-09 03:40:10 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-11 15:18:14 -0500
commitcfb046cb800ba306b211fbbe4ac633486e11055f (patch)
tree8b2399a4aa900c7e50744d59f264e2546569f6f0 /drivers
parent33f6984ecefb9b84f1b4d1d3b9022731bb8b62d0 (diff)
[media] cx18/ivtv: fix regression: remove __init from a non-init function
Commits 5e6e81b2890db3969527772a8350825a85c22d5c (cx18) and 2aebbf6737212265b917ed27c875c59d3037110a (ivtv) added an __init annotation to the cx18-alsa-load and ivtv-alsa-load functions. However, these functions are called *after* initialization by the main cx18/ivtv driver. By that time the memory containing those functions is already freed and your machine goes BOOM. Cc: stable@vger.kernel.org # for 3.8 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/pci/cx18/cx18-alsa-main.c2
-rw-r--r--drivers/media/pci/cx18/cx18-alsa-pcm.h2
-rw-r--r--drivers/media/pci/ivtv/ivtv-alsa-main.c2
-rw-r--r--drivers/media/pci/ivtv/ivtv-alsa-pcm.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/pci/cx18/cx18-alsa-main.c b/drivers/media/pci/cx18/cx18-alsa-main.c
index 8e971ff60588..b2c8c3439fea 100644
--- a/drivers/media/pci/cx18/cx18-alsa-main.c
+++ b/drivers/media/pci/cx18/cx18-alsa-main.c
@@ -197,7 +197,7 @@ err_exit:
197 return ret; 197 return ret;
198} 198}
199 199
200static int __init cx18_alsa_load(struct cx18 *cx) 200static int cx18_alsa_load(struct cx18 *cx)
201{ 201{
202 struct v4l2_device *v4l2_dev = &cx->v4l2_dev; 202 struct v4l2_device *v4l2_dev = &cx->v4l2_dev;
203 struct cx18_stream *s; 203 struct cx18_stream *s;
diff --git a/drivers/media/pci/cx18/cx18-alsa-pcm.h b/drivers/media/pci/cx18/cx18-alsa-pcm.h
index d26e51f94577..e2b2c5b01215 100644
--- a/drivers/media/pci/cx18/cx18-alsa-pcm.h
+++ b/drivers/media/pci/cx18/cx18-alsa-pcm.h
@@ -20,7 +20,7 @@
20 * 02111-1307 USA 20 * 02111-1307 USA
21 */ 21 */
22 22
23int __init snd_cx18_pcm_create(struct snd_cx18_card *cxsc); 23int snd_cx18_pcm_create(struct snd_cx18_card *cxsc);
24 24
25/* Used by cx18-mailbox to announce the PCM data to the module */ 25/* Used by cx18-mailbox to announce the PCM data to the module */
26void cx18_alsa_announce_pcm_data(struct snd_cx18_card *card, u8 *pcm_data, 26void cx18_alsa_announce_pcm_data(struct snd_cx18_card *card, u8 *pcm_data,
diff --git a/drivers/media/pci/ivtv/ivtv-alsa-main.c b/drivers/media/pci/ivtv/ivtv-alsa-main.c
index 4a221c693995..e970cface70e 100644
--- a/drivers/media/pci/ivtv/ivtv-alsa-main.c
+++ b/drivers/media/pci/ivtv/ivtv-alsa-main.c
@@ -205,7 +205,7 @@ err_exit:
205 return ret; 205 return ret;
206} 206}
207 207
208static int __init ivtv_alsa_load(struct ivtv *itv) 208static int ivtv_alsa_load(struct ivtv *itv)
209{ 209{
210 struct v4l2_device *v4l2_dev = &itv->v4l2_dev; 210 struct v4l2_device *v4l2_dev = &itv->v4l2_dev;
211 struct ivtv_stream *s; 211 struct ivtv_stream *s;
diff --git a/drivers/media/pci/ivtv/ivtv-alsa-pcm.h b/drivers/media/pci/ivtv/ivtv-alsa-pcm.h
index 23dfe0d12400..186814e0b2d4 100644
--- a/drivers/media/pci/ivtv/ivtv-alsa-pcm.h
+++ b/drivers/media/pci/ivtv/ivtv-alsa-pcm.h
@@ -20,4 +20,4 @@
20 * 02111-1307 USA 20 * 02111-1307 USA
21 */ 21 */
22 22
23int __init snd_ivtv_pcm_create(struct snd_ivtv_card *itvsc); 23int snd_ivtv_pcm_create(struct snd_ivtv_card *itvsc);