Date: Sat, 17 May 2014 18:02:46 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266333 - head/sys/arm/include Message-ID: <201405171802.s4HI2kwL082917@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sat May 17 18:02:46 2014 New Revision: 266333 URL: http://svnweb.freebsd.org/changeset/base/266333 Log: Add FDT_PLATFORM_DEF2 for when there are multiple platforms needing to use the same platform methods. Modified: head/sys/arm/include/platformvar.h Modified: head/sys/arm/include/platformvar.h ============================================================================== --- head/sys/arm/include/platformvar.h Sat May 17 17:54:38 2014 (r266332) +++ head/sys/arm/include/platformvar.h Sat May 17 18:02:46 2014 (r266333) @@ -83,21 +83,24 @@ typedef struct fdt_platform_class fdt_pl extern platform_method_t fdt_platform_methods[]; -#define FDT_PLATFORM_DEF(NAME, NAME_STR, size, compatible) \ -static fdt_platform_def_t NAME ## _fdt_platform = { \ - .name = NAME_STR, \ - .methods = fdt_platform_methods, \ - .fdt_compatible = compatible, \ -}; \ -static kobj_class_t NAME ## _baseclasses[] = \ - { (kobj_class_t)&NAME ## _fdt_platform, NULL }; \ -static platform_def_t NAME ## _platform = { \ - NAME_STR, \ - NAME ## _methods, \ - size, \ - NAME ## _baseclasses, \ -}; \ -DATA_SET(platform_set, NAME ## _platform) +#define FDT_PLATFORM_DEF2(NAME, VAR_NAME, NAME_STR, size, compatible) \ +static fdt_platform_def_t VAR_NAME ## _fdt_platform = { \ + .name = NAME_STR, \ + .methods = fdt_platform_methods, \ + .fdt_compatible = compatible, \ +}; \ +static kobj_class_t VAR_NAME ## _baseclasses[] = \ + { (kobj_class_t)&VAR_NAME ## _fdt_platform, NULL }; \ +static platform_def_t VAR_NAME ## _platform = { \ + NAME_STR, \ + NAME ## _methods, \ + size, \ + VAR_NAME ## _baseclasses, \ +}; \ +DATA_SET(platform_set, VAR_NAME ## _platform) + +#define FDT_PLATFORM_DEF(NAME, NAME_STR, size, compatible) \ + FDT_PLATFORM_DEF2(NAME, NAME, NAME_STR, size, compatible) #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405171802.s4HI2kwL082917>