Skip to contentSkip to conversation

zoran: compilatation failure on ARM Orion

v4l-dvb-maintainer Trent Piepho 2 participants 2 messages Feb 14, 2008 – Feb 15, 2008 2 messages not in the archive Media (V4L/DVB)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 11 lines · Lennert Buytenhek
Quoted 9 lines · Martin Michlmayr

The zoran driver fails to compile on the ARM Orion platform with:

In file included from drivers/media/video/zoran_procfs.c:50:
drivers/media/video/zoran.h:232: error: expected identifier before numeric constant

The reason is that drivers/media/video/zoran.h defines an enum with GPIO_MAX in it, but Orion contains a #define GPIO_MAX 32 in include/asm-arm/arch-orion/orion.h

Quoted 5 lines
Quoted 2 lines

I think it would be good if zoran.h would prefix these very generic GPIO names with something.

Not sure who is at fault here, as they're both playing in the same global namespace. I guess we could patch either.

Not entirely the same namespace, as the arch header is included far more often than the zoran.h header, which is only used by the zoran driver. If zoran uses GPIO_MAX, it's still possible for any other driver to use it too. Just as global function naming needs more namespace care than static function naming, it seems like global arch headers should take more care than local driver headers.

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#3 lore raw
In reply to a message not in the archive
Quoted 5 lines · On Thu, 14 Feb 2008 13:59:30 +0100 Martin Michlmayr <[email protected]> wrote:

The zoran driver fails to compile on the ARM Orion platform with:

In file included from drivers/media/video/zoran_procfs.c:50:
drivers/media/video/zoran.h:232: error: expected identifier before numeric constant

Quoted 7 lines

The reason is that drivers/media/video/zoran.h defines an enum with GPIO_MAX in it, but Orion contains a #define GPIO_MAX 32 in include/asm-arm/arch-orion/orion.h

I think it would be good if zoran.h would prefix these very generic GPIO names with something.

Ok, I've wrote a fix for Zoran, doing:

	s/GPIO_/ZR_GPIO_/g

Yet, as Trent noticed, the better would be if arch-orion also to avoid using such generic names.

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list