Re: [PATCH] tdfxfb: mtrr support
From: Krzysztof Helt <hidden>
Date: 2007-07-30 11:55:15
On Mon, 30 Jul 2007 07:16:31 +0800 "Antonino A. Daplas" [off-list ref] wrote:
Since akpm already commented against using #ifdef's within functions,
might as well modify the patch to something like this:
#ifdef CONFIG_MTRR
static inline void tdfxfb_mtrr_add(struct fb_info *info)
{
struct tdfxfb_par *par = info->par;
par->mtrr_handle = mtrr_add(info->fix.smem_start,
info->fix.smem_len,
MTRR_TYPE_WRCOMB, 1);
}
#else
#define tdfxfb_mtrr_add(...) do {} while (0)
#endifIt doesn't really solve all mtrr #ifdefs problems. The ultimate solution is to move mtrr.h to include/asm-generic or include/linux directory. It has redefined all functions as dummies in case CONFIG_MTRR is not defined. Regards, Krzysztof ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/