[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] [PATCH] Change name of kentry member XHNewCookie
Some time ago I added the function XHNewCookie to kentry struct to
allow the installation of XHDI drivers.
Now while rewriting part of the USB mass storage driver from assembly
to C I see I must have chosen another name for the struct member.
Drivers are going to use the names given by the XHDI specification and
XHNewCookie will conflict with the function name in kentry.
So to allow drivers to have their function names consistent I'd like
to change the name in kentry.
I think only USB mass storage driver has been using it so I think
there will be no problem.
I've been thinking in sending this patch or not because I find it a
little bit ridiculous but I think is the thing to do.
Comment:
Change struct member name XHNewCookie to xhnewcookie to avoid possible
conflicts with drivers code.
Index: libkern/kernel_module.h
===================================================================
RCS file: /mint/freemint/sys/libkern/kernel_module.h,v
retrieving revision 1.45
diff -u -8 -r1.45 kernel_module.h
--- libkern/kernel_module.h 10 Mar 2012 10:39:51 -0000 1.45
+++ libkern/kernel_module.h 28 Mar 2012 15:04:40 -0000
@@ -946,17 +946,17 @@
# define trap_1_emu (*KENTRY->vec.misc.trap_1_emu)
# define trap_13_emu (*KENTRY->vec.misc.trap_13_emu)
# define trap_14_emu (*KENTRY->vec.misc.trap_14_emu)
# define ROM_Setexc(vnum,vptr) (void (*)(void))trap_13_emu(0x05,(short)(vnum),(long)(vptr))
#ifdef XHDI_MASS_STORAGE_SUPPORT
-# define XHNewCookie (*KENTRY->vec_misc.XHNewCookie)
+# define xhnewcookie (*KENTRY->vec_misc.xhnewcookie)
#endif
/*
* kentry_debug
*/
# define DEBUG_LEVEL (*KENTRY->vec_debug.debug_level)
# define KERNEL_TRACE (*KENTRY->vec_debug.trace)
# define KERNEL_DEBUG (*KENTRY->vec_debug.debug)
Index: mint/kentry.h
===================================================================
RCS file: /mint/freemint/sys/mint/kentry.h,v
retrieving revision 1.44
diff -u -8 -r1.44 kentry.h
--- mint/kentry.h 29 Nov 2011 17:23:34 -0000 1.44
+++ mint/kentry.h 28 Mar 2012 15:04:41 -0000
@@ -105,17 +105,17 @@
* Every structure size modification *must* increase the major version.
* Every other modifcation must increase the minor version.
*
* major and minor are of type unsigned char. I hope 255 major and minor
* versions are enough :-)
*/
#define KENTRY_MAJ_VERSION 0
#ifdef XHDI_MASS_STORAGE_SUPPORT
-#define KENTRY_MIN_VERSION 18
+#define KENTRY_MIN_VERSION 19
#else
#define KENTRY_MIN_VERSION 17
#endif
/* hardware dependant vector
*/
struct kentry_mch
{
/* global values/flags */
@@ -565,17 +565,17 @@
*/
long _cdecl (*trap_1_emu)(short fnum, ...);
long _cdecl (*trap_13_emu)(short fnum, ...);
long _cdecl (*trap_14_emu)(short fnum, ...);
#ifdef XHDI_MASS_STORAGE_SUPPORT
/*
* function to install XHDI drivers
*/
- long _cdecl (*XHNewCookie)(void *newcookie);
+ long _cdecl (*xhnewcookie)(void *newcookie);
#endif
};
#ifdef XHDI_MASS_STORAGE_SUPPORT
#define DEFAULTS_kentry_misc \
{ \
&dma, \
\
get_toscookie, \
@@ -583,17 +583,17 @@
add_rsvfentry, \
del_rsvfentry, \
\
remaining_proc_time, \
\
trap_1_emu, \
trap_13_emu, \
trap_14_emu, \
- XHNewCookie, \
+ xhnewcookie, \
}
#else
#define DEFAULTS_kentry_misc \
{ \
&dma, \
\
get_toscookie, \
\
Index: usb/src.km/udd/storage/usb_storage.c
===================================================================
RCS file: /mint/freemint/sys/usb/src.km/udd/storage/usb_storage.c,v
retrieving revision 1.2
diff -u -8 -r1.2 usb_storage.c
--- usb/src.km/udd/storage/usb_storage.c 30 Jul 2011 19:21:00 -0000 1.2
+++ usb/src.km/udd/storage/usb_storage.c 28 Mar 2012 15:04:44 -0000
@@ -390,17 +390,17 @@
b_ubconout(dev, c);
}
long
XHDINewCookie_from_S(void *newcookie)
{
long r;
- r = XHNewCookie(newcookie);
+ r = xhnewcookie(newcookie);
DEBUG((" XHNewCookie %d", r));
return r;
}
/* --- Inteface functions -------------------------------------------------- */
static long _cdecl
storage_open (struct uddif *u)