From: 陈亮 Date: Wed, 21 May 2014 12:16:45 +0000 (-0700) Subject: fix bug: ddr freq will not change any more when video quit abnormal X-Git-Tag: firefly_0821_release~5249 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2503f7a325ca75f7afec772dd06bf5a41506946a;p=firefly-linux-kernel-4.4.55.git fix bug: ddr freq will not change any more when video quit abnormal --- diff --git a/arch/arm/mach-rockchip/ddr_freq.c b/arch/arm/mach-rockchip/ddr_freq.c index 6284eac31677..f5f1d4ad74df 100644 --- a/arch/arm/mach-rockchip/ddr_freq.c +++ b/arch/arm/mach-rockchip/ddr_freq.c @@ -344,6 +344,15 @@ void del_video_info(struct video_info *video_info) } } +void clear_video_info(void) +{ + struct video_info *video_info, *next; + + list_for_each_entry_safe(video_info, next, &ddr.video_info_list, node) { + del_video_info(video_info); + } +} + struct video_info *find_video_info(struct video_info *match_video_info) { struct video_info *video_info; @@ -483,6 +492,8 @@ static ssize_t video_state_write(struct file *file, const char __user *buffer, static int video_state_release(struct inode *inode, struct file *file) { dprintk(DEBUG_VIDEO_STATE, "video_state release\n"); + clear_video_info(); + update_video_info(); return 0; }