X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sound%2Fsoc%2Fcodecs%2Fstac9766.c;h=cc0566c22ec12ecfcf3f67d486b6330fea448f47;hb=cf1ee98d800459e6f055742f84355b1aa9e937ae;hp=78b2b50271e25893ade9c8b0ce3b0f0be6ab4e92;hpb=e8cdfb0509f48d44d95d68d4f42d8d71a9ba4acd;p=deliverable%2Flinux.git diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index 78b2b50271e2..cc0566c22ec1 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c @@ -256,8 +256,7 @@ static int stac9766_reset(struct snd_soc_codec *codec, int try_warm) return 0; } -static int stac9766_codec_suspend(struct snd_soc_codec *codec, - pm_message_t state) +static int stac9766_codec_suspend(struct snd_soc_codec *codec) { stac9766_set_bias_level(codec, SND_SOC_BIAS_OFF); return 0; @@ -286,11 +285,11 @@ reset: return 0; } -static struct snd_soc_dai_ops stac9766_dai_ops_analog = { +static const struct snd_soc_dai_ops stac9766_dai_ops_analog = { .prepare = ac97_analog_prepare, }; -static struct snd_soc_dai_ops stac9766_dai_ops_digital = { +static const struct snd_soc_dai_ops stac9766_dai_ops_digital = { .prepare = ac97_digital_prepare, }; @@ -380,7 +379,7 @@ static struct snd_soc_codec_driver soc_codec_dev_stac9766 = { .remove = stac9766_codec_remove, .suspend = stac9766_codec_suspend, .resume = stac9766_codec_resume, - .reg_cache_size = sizeof(stac9766_reg), + .reg_cache_size = ARRAY_SIZE(stac9766_reg), .reg_word_size = sizeof(u16), .reg_cache_step = 2, .reg_cache_default = stac9766_reg, @@ -408,17 +407,7 @@ static struct platform_driver stac9766_codec_driver = { .remove = __devexit_p(stac9766_remove), }; -static int __init stac9766_init(void) -{ - return platform_driver_register(&stac9766_codec_driver); -} -module_init(stac9766_init); - -static void __exit stac9766_exit(void) -{ - platform_driver_unregister(&stac9766_codec_driver); -} -module_exit(stac9766_exit); +module_platform_driver(stac9766_codec_driver); MODULE_DESCRIPTION("ASoC stac9766 driver"); MODULE_AUTHOR("Jon Smirl ");