@@ -766,7 +766,6 @@ void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec)
766766 snd_hda_ctls_clear (codec );
767767 codec_release_pcms (codec );
768768 snd_hda_detach_beep_device (codec );
769- memset (& codec -> patch_ops , 0 , sizeof (codec -> patch_ops ));
770769 snd_hda_jack_tbl_clear (codec );
771770 codec -> proc_widget_hook = NULL ;
772771 codec -> spec = NULL ;
@@ -1132,8 +1131,6 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
11321131
11331132 if (driver -> ops && driver -> ops -> stream_pm )
11341133 driver -> ops -> stream_pm (codec , nid , true);
1135- else if (codec -> patch_ops .stream_pm )
1136- codec -> patch_ops .stream_pm (codec , nid , true);
11371134 if (codec -> pcm_format_first )
11381135 update_pcm_format (codec , p , nid , format );
11391136 update_pcm_stream_id (codec , p , nid , stream_tag , channel_id );
@@ -1205,8 +1202,6 @@ static void really_cleanup_stream(struct hda_codec *codec,
12051202 q -> nid = nid ;
12061203 if (driver -> ops && driver -> ops -> stream_pm )
12071204 driver -> ops -> stream_pm (codec , nid , false);
1208- else if (codec -> patch_ops .stream_pm )
1209- codec -> patch_ops .stream_pm (codec , nid , false);
12101205}
12111206
12121207/* clean up the all conflicting obsolete streams */
@@ -2397,7 +2392,7 @@ static const struct snd_kcontrol_new dig_mixes[] = {
23972392 * @cvt_nid: converter NID
23982393 * @type: HDA_PCM_TYPE_*
23992394 * Creates controls related with the digital output.
2400- * Called from each patch supporting the digital out.
2395+ * Called from each codec driver supporting the digital out.
24012396 *
24022397 * Returns 0 if successful, or a negative error code.
24032398 */
@@ -2656,7 +2651,7 @@ static const struct snd_kcontrol_new dig_in_ctls[] = {
26562651 * @nid: audio in widget NID
26572652 *
26582653 * Creates controls related with the SPDIF input.
2659- * Called from each patch supporting the SPDIF in.
2654+ * Called from each codec driver supporting the SPDIF in.
26602655 *
26612656 * Returns 0 if successful, or a negative error code.
26622657 */
@@ -2773,9 +2768,6 @@ static unsigned int hda_set_power_state(struct hda_codec *codec,
27732768 /* might be called before binding to driver, too */
27742769 if (driver && driver -> ops && driver -> ops -> set_power_state )
27752770 driver -> ops -> set_power_state (codec , fg , power_state );
2776- else if (codec -> patch_ops .set_power_state )
2777- codec -> patch_ops .set_power_state (codec , fg ,
2778- power_state );
27792771 else {
27802772 state = power_state ;
27812773 if (codec -> power_filter )
@@ -2859,8 +2851,6 @@ static unsigned int hda_call_codec_suspend(struct hda_codec *codec)
28592851 snd_hdac_enter_pm (& codec -> core );
28602852 if (driver -> ops && driver -> ops -> suspend )
28612853 driver -> ops -> suspend (codec );
2862- else if (codec -> patch_ops .suspend )
2863- codec -> patch_ops .suspend (codec );
28642854 if (!codec -> no_stream_clean_at_suspend )
28652855 hda_cleanup_all_streams (codec );
28662856 state = hda_set_power_state (codec , AC_PWRST_D3 );
@@ -2888,8 +2878,6 @@ static void hda_call_codec_resume(struct hda_codec *codec)
28882878 snd_hda_jack_set_dirty_all (codec );
28892879 if (driver -> ops && driver -> ops -> resume )
28902880 driver -> ops -> resume (codec );
2891- else if (codec -> patch_ops .resume )
2892- codec -> patch_ops .resume (codec );
28932881 else {
28942882 snd_hda_codec_init (codec );
28952883 snd_hda_regmap_sync (codec );
@@ -3085,8 +3073,6 @@ int snd_hda_codec_build_controls(struct hda_codec *codec)
30853073 if (!err ) {
30863074 if (driver -> ops && driver -> ops -> build_controls )
30873075 err = driver -> ops -> build_controls (codec );
3088- else if (codec -> patch_ops .build_controls )
3089- err = codec -> patch_ops .build_controls (codec );
30903076 if (err < 0 )
30913077 return err ;
30923078 }
@@ -3284,8 +3270,6 @@ int snd_hda_codec_parse_pcms(struct hda_codec *codec)
32843270
32853271 if (driver -> ops && driver -> ops -> build_pcms )
32863272 err = driver -> ops -> build_pcms (codec );
3287- else if (codec -> patch_ops .build_pcms )
3288- err = codec -> patch_ops .build_pcms (codec );
32893273 else
32903274 return 0 ;
32913275
0 commit comments