From: Tom Rini [ aside: This has been sitting in the linuxppc-2.5 bk tree for I don't know how long. And the driver is still horribly broken. ] The following patch moves overlay_is_active to before its first use. It was originally written when gcc wouldn't complain, but now does, about not having the definition before usage. Signed-off-by: Tom Rini Signed-off-by: Andrew Morton --- 25-akpm/drivers/media/video/planb.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff -puN drivers/media/video/planb.c~ppc32-fix-a-warning-in-planb-video-driver drivers/media/video/planb.c --- 25/drivers/media/video/planb.c~ppc32-fix-a-warning-in-planb-video-driver 2005-03-15 22:22:33.000000000 -0800 +++ 25-akpm/drivers/media/video/planb.c 2005-03-15 22:22:33.000000000 -0800 @@ -422,6 +422,16 @@ static void planb_prepare_close(struct p /* overlay support functions */ /*****************************/ +static inline int overlay_is_active(struct planb *pb) +{ + unsigned int size = pb->tab_size * sizeof(struct dbdma_cmd); + unsigned int caddr = (unsigned)in_le32(&pb->planb_base->ch1.cmdptr); + + return (in_le32(&pb->overlay_last1->cmd_dep) == pb->ch1_cmd_phys) + && (caddr < (pb->ch1_cmd_phys + size)) + && (caddr >= (unsigned)pb->ch1_cmd_phys); +} + static void overlay_start(struct planb *pb) { @@ -853,16 +863,6 @@ static int palette2fmt[] = { #define PLANB_PALETTE_MAX 15 -static inline int overlay_is_active(struct planb *pb) -{ - unsigned int size = pb->tab_size * sizeof(struct dbdma_cmd); - unsigned int caddr = (unsigned)in_le32(&pb->planb_base->ch1.cmdptr); - - return (in_le32(&pb->overlay_last1->cmd_dep) == pb->ch1_cmd_phys) - && (caddr < (pb->ch1_cmd_phys + size)) - && (caddr >= (unsigned)pb->ch1_cmd_phys); -} - static int vgrab(struct planb *pb, struct video_mmap *mp) { unsigned int fr = mp->frame; _