: Make IP22 compile without newport
PATCH 1/1 : Make IP22 compile without newport
Hi
Make sgi-ip22 compile without newport support. Users that don't have a graphic card (or an unsupported graphics card) don't need it.
Once there, I remove a duplicated call to gfx_register().
TODO: shmiq.o can also be removed when you don't have setup
CONFIG_NEWPORT_CONSOLE or CONFIG_NEWPORT_GFX. But they have an incestous relation with this file.
Later, Juan.
build/arch/mips/sgi-ip22/ip22-setup.c | 3 ++- build/drivers/char/misc.c | 5 ----- build/drivers/sgi/char/Makefile | 5 +++-- build/drivers/sgi/char/shmiq.c | 11 +++++++++-- 4 files changed, 14 insertions(+), 10 deletions(-)
build/arch/mips/sgi-ip22/ip22-setup.c renamed from build/arch/mips/sgi-ip22/ip22-setup.c~newport +2 -1
@@ -142,8 +142,9 @@ void __init ip22_setup(void)/* Now enable boardcaches, if any. */ indy_sc_init ();#endif +#ifdef CONFIG_VT conswitchp =NULL ; - +#endif /* Set the IO space to some sane value */ set_io_port_base (KSEG1ADDR (0x00080000 ));
build/drivers/sgi/char/Makefile renamed from build/drivers/sgi/char/Makefile~newport +3 -2
@@ -10,10 +10,11 @@ O_TARGET := sgichar.o export-objs := newport.o rrm.o shmiq.o sgicons.o usema.o rrm.o -obj-y := newport.o shmiq.o sgicons.o usema.o streamable.o +obj-y := shmiq.o obj-$(CONFIG_IP22_SERIAL) += sgiserial.o +obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport.o streamable.o obj-$(CONFIG_SGI_DS1286) += ds1286.o -obj-$(CONFIG_SGI_NEWPORT_GFX) += graphics.o rrm.o +obj-$(CONFIG_SGI_NEWPORT_GFX) += sgicons.o graphics.o rrm.o usema.o include $(TOPDIR)/Rules.make
build/drivers/sgi/char/shmiq.c renamed from build/drivers/sgi/char/shmiq.c~newport +9 -2
@@ -166,6 +166,7 @@ shmiq_forget_file (unsigned long fdes)return 0 ; } +#ifdef CONFIG_SGI_NEWPORT_GFX static int shmiq_sioc (int device,int cmd,struct strioctl *s) {
@@ -194,12 +195,12 @@ shmiq_sioc (int device, int cmd, structprintk ("Unknown I_STR request for shmiq device: 0x%x\n" , cmd); return -EINVAL; } +#endif /* CONFIG_SGI_NEWPORT_GFX */ static int shmiq_ioctl (struct inode *inode,struct file *f,unsigned int cmd,unsigned long arg) {struct file *file; -struct strioctl sioc;int v;switch (cmd){
@@ -226,7 +227,10 @@ shmiq_ioctl (struct inode *inode, struct v =shmiq_forget_file (arg);return v; -case I_STR : +#ifdef CONFIG_SGI_NEWPORT_GFX +case I_STR : { +struct strioctl sioc; + v =get_sioc (&sioc, arg);if (v)return v;
@@ -234,6 +238,8 @@ shmiq_ioctl (struct inode *inode, struct/* FIXME: This forces device = 0 */ return shmiq_sioc (0, sioc.ic_cmd, &sioc); } +#endif + }return -EINVAL ;
@@ -471,3 +477,4 @@ shmiq_init (void) }EXPORT_SYMBOL (shmiq_init); +EXPORT_SYMBOL (shmiq_push_event);
build/drivers/char/misc.c renamed from build/drivers/char/misc.c~newport +0 -5
@@ -266,12 +266,7 @@ int __init misc_init(void)pmu_device_init ();#endif #ifdef CONFIG_SGI_NEWPORT_GFX -gfx_register (); -#endif -#ifdef CONFIG_SGI_IP22 streamable_init (); -#endif -#ifdef CONFIG_SGI_NEWPORT_GFX gfx_register ();#endif #ifdef CONFIG_TOSHIBA
_
Signature · 2 lines
In theory, practice and theory are the same, but in practice they are different -- Larry McVoy