Skip to content

Commit 5ae1217

Browse files
hharrisontorvalds
authored andcommitted
video: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: Antonino Daplas <adaplas@gmail.com> Cc: Antonino A. Daplas <adaplas@gmail.com> Cc: Antonino Daplas <adaplas@pol.net> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Jean Delvare <khali@linux-fr.org> Cc: Adrian Bunk <bunk@stusta.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e7a05aa commit 5ae1217

28 files changed

Lines changed: 106 additions & 106 deletions

‎drivers/video/amifb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
#endif
9797

9898
#ifdef DEBUG
99-
# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
99+
# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
100100
#else
101101
# define DPRINTK(fmt, args...)
102102
#endif

‎drivers/video/aty/aty128fb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
#undef DEBUG
9292

9393
#ifdef DEBUG
94-
#define DBG(fmt, args...) printk(KERN_DEBUG "aty128fb: %s " fmt, __FUNCTION__, ##args);
94+
#define DBG(fmt, args...) printk(KERN_DEBUG "aty128fb: %s " fmt, __func__, ##args);
9595
#else
9696
#define DBG(fmt, args...)
9797
#endif

‎drivers/video/aty/mach64_ct.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static int aty_dsp_gt(const struct fb_info *info, u32 bpp, struct pll_ct *pll)
197197
pll->dsp_config = (dsp_precision << 20) | (pll->dsp_loop_latency << 16) | dsp_xclks;
198198
#ifdef DEBUG
199199
printk("atyfb(%s): dsp_config 0x%08x, dsp_on_off 0x%08x\n",
200-
__FUNCTION__, pll->dsp_config, pll->dsp_on_off);
200+
__func__, pll->dsp_config, pll->dsp_on_off);
201201
#endif
202202
return 0;
203203
}
@@ -225,7 +225,7 @@ static int aty_valid_pll_ct(const struct fb_info *info, u32 vclk_per, struct pll
225225
(par->ref_clk_per * pll->pll_ref_div);
226226
#ifdef DEBUG
227227
printk("atyfb(%s): pllvclk=%d MHz, vclk=%d MHz\n",
228-
__FUNCTION__, pllvclk, pllvclk / pll->vclk_post_div_real);
228+
__func__, pllvclk, pllvclk / pll->vclk_post_div_real);
229229
#endif
230230
pll->pll_vclk_cntl = 0x03; /* VCLK = PLL_VCLK/VCLKx_POST */
231231

@@ -269,7 +269,7 @@ static u32 aty_pll_to_var_ct(const struct fb_info *info, const union aty_pll *pl
269269
}
270270
#endif
271271
#ifdef DEBUG
272-
printk("atyfb(%s): calculated 0x%08X(%i)\n", __FUNCTION__, ret, ret);
272+
printk("atyfb(%s): calculated 0x%08X(%i)\n", __func__, ret, ret);
273273
#endif
274274
return ret;
275275
}
@@ -284,11 +284,11 @@ void aty_set_pll_ct(const struct fb_info *info, const union aty_pll *pll)
284284
#ifdef DEBUG
285285
printk("atyfb(%s): about to program:\n"
286286
"pll_ext_cntl=0x%02x pll_gen_cntl=0x%02x pll_vclk_cntl=0x%02x\n",
287-
__FUNCTION__,
287+
__func__,
288288
pll->ct.pll_ext_cntl, pll->ct.pll_gen_cntl, pll->ct.pll_vclk_cntl);
289289

290290
printk("atyfb(%s): setting clock %lu for FeedBackDivider %i, ReferenceDivider %i, PostDivider %i(%i)\n",
291-
__FUNCTION__,
291+
__func__,
292292
par->clk_wr_offset, pll->ct.vclk_fb_div,
293293
pll->ct.pll_ref_div, pll->ct.vclk_post_div, pll->ct.vclk_post_div_real);
294294
#endif
@@ -428,7 +428,7 @@ static int __devinit aty_init_pll_ct(const struct fb_info *info,
428428

429429
#ifdef DEBUG
430430
printk("atyfb(%s): mclk_fb_mult=%d, xclk_post_div=%d\n",
431-
__FUNCTION__, pll->ct.mclk_fb_mult, pll->ct.xclk_post_div);
431+
__func__, pll->ct.mclk_fb_mult, pll->ct.xclk_post_div);
432432
#endif
433433

434434
memcntl = aty_ld_le32(MEM_CNTL, par);
@@ -540,7 +540,7 @@ static int __devinit aty_init_pll_ct(const struct fb_info *info,
540540
pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) /
541541
(par->ref_clk_per * pll->ct.pll_ref_div);
542542
printk("atyfb(%s): pllmclk=%d MHz, xclk=%d MHz\n",
543-
__FUNCTION__, pllmclk, pllmclk / pll->ct.xclk_post_div_real);
543+
__func__, pllmclk, pllmclk / pll->ct.xclk_post_div_real);
544544
#endif
545545

546546
if (M64_HAS(SDRAM_MAGIC_PLL) && (par->ram_type >= SDRAM))
@@ -581,7 +581,7 @@ static int __devinit aty_init_pll_ct(const struct fb_info *info,
581581
pllsclk = (1000000 * 2 * pll->ct.sclk_fb_div) /
582582
(par->ref_clk_per * pll->ct.pll_ref_div);
583583
printk("atyfb(%s): use sclk, pllsclk=%d MHz, sclk=mclk=%d MHz\n",
584-
__FUNCTION__, pllsclk, pllsclk / sclk_post_div_real);
584+
__func__, pllsclk, pllsclk / sclk_post_div_real);
585585
#endif
586586
}
587587

‎drivers/video/bf54x-lq043fb.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static int bfin_bf54x_fb_check_var(struct fb_var_screeninfo *var,
336336
{
337337

338338
if (var->bits_per_pixel != LCD_BPP) {
339-
pr_debug("%s: depth not supported: %u BPP\n", __FUNCTION__,
339+
pr_debug("%s: depth not supported: %u BPP\n", __func__,
340340
var->bits_per_pixel);
341341
return -EINVAL;
342342
}
@@ -345,7 +345,7 @@ static int bfin_bf54x_fb_check_var(struct fb_var_screeninfo *var,
345345
info->var.xres_virtual != var->xres_virtual ||
346346
info->var.yres_virtual != var->yres_virtual) {
347347
pr_debug("%s: Resolution not supported: X%u x Y%u \n",
348-
__FUNCTION__, var->xres, var->yres);
348+
__func__, var->xres, var->yres);
349349
return -EINVAL;
350350
}
351351

@@ -355,7 +355,7 @@ static int bfin_bf54x_fb_check_var(struct fb_var_screeninfo *var,
355355

356356
if ((info->fix.line_length * var->yres_virtual) > info->fix.smem_len) {
357357
pr_debug("%s: Memory Limit requested yres_virtual = %u\n",
358-
__FUNCTION__, var->yres_virtual);
358+
__func__, var->yres_virtual);
359359
return -ENOMEM;
360360
}
361361

‎drivers/video/cfbimgblt.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#define DEBUG
3939

4040
#ifdef DEBUG
41-
#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt,__FUNCTION__,## args)
41+
#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt,__func__,## args)
4242
#else
4343
#define DPRINTK(fmt, args...)
4444
#endif

‎drivers/video/cirrusfb.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
/* debug output */
8282
#ifdef CIRRUSFB_DEBUG
8383
#define DPRINTK(fmt, args...) \
84-
printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
84+
printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
8585
#else
8686
#define DPRINTK(fmt, args...)
8787
#endif
@@ -91,7 +91,7 @@
9191
#define assert(expr) \
9292
if (!(expr)) { \
9393
printk("Assertion failed! %s,%s,%s,line=%d\n", \
94-
#expr, __FILE__, __FUNCTION__, __LINE__); \
94+
#expr, __FILE__, __func__, __LINE__); \
9595
}
9696
#else
9797
#define assert(expr)

‎drivers/video/console/fbcon.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
#include "fbcon.h"
9393

9494
#ifdef FBCONDEBUG
95-
# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
95+
# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
9696
#else
9797
# define DPRINTK(fmt, args...)
9898
#endif

‎drivers/video/imsttfb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,7 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
14781478

14791479
dp = pci_device_to_OF_node(pdev);
14801480
if(dp)
1481-
printk(KERN_INFO "%s: OF name %s\n",__FUNCTION__, dp->name);
1481+
printk(KERN_INFO "%s: OF name %s\n",__func__, dp->name);
14821482
else
14831483
printk(KERN_ERR "imsttfb: no OF node for pci device\n");
14841484
#endif /* CONFIG_PPC_OF */

‎drivers/video/imxfb.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ static void imxfb_setup_gpio(struct imxfb_info *fbi)
415415
static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
416416
{
417417
struct imxfb_info *fbi = platform_get_drvdata(dev);
418-
pr_debug("%s\n",__FUNCTION__);
418+
pr_debug("%s\n",__func__);
419419

420420
imxfb_disable_controller(fbi);
421421
return 0;
@@ -424,7 +424,7 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
424424
static int imxfb_resume(struct platform_device *dev)
425425
{
426426
struct imxfb_info *fbi = platform_get_drvdata(dev);
427-
pr_debug("%s\n",__FUNCTION__);
427+
pr_debug("%s\n",__func__);
428428

429429
imxfb_enable_controller(fbi);
430430
return 0;
@@ -440,7 +440,7 @@ static int __init imxfb_init_fbinfo(struct device *dev)
440440
struct fb_info *info = dev_get_drvdata(dev);
441441
struct imxfb_info *fbi = info->par;
442442

443-
pr_debug("%s\n",__FUNCTION__);
443+
pr_debug("%s\n",__func__);
444444

445445
info->pseudo_palette = kmalloc( sizeof(u32) * 16, GFP_KERNEL);
446446
if (!info->pseudo_palette)

‎drivers/video/matrox/matroxfb_DAC1064.c‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static void DAC1064_calcclock(CPMINFO unsigned int freq, unsigned int fmax, unsi
3737
unsigned int fvco;
3838
unsigned int p;
3939

40-
DBG(__FUNCTION__)
40+
DBG(__func__)
4141

4242
/* only for devices older than G450 */
4343

@@ -83,7 +83,7 @@ static const unsigned char MGA1064_DAC[] = {
8383
static void DAC1064_setpclk(WPMINFO unsigned long fout) {
8484
unsigned int m, n, p;
8585

86-
DBG(__FUNCTION__)
86+
DBG(__func__)
8787

8888
DAC1064_calcclock(PMINFO fout, ACCESS_FBINFO(max_pixel_clock), &m, &n, &p);
8989
ACCESS_FBINFO(hw).DACclk[0] = m;
@@ -95,7 +95,7 @@ static void DAC1064_setmclk(WPMINFO int oscinfo, unsigned long fmem) {
9595
u_int32_t mx;
9696
struct matrox_hw_state* hw = &ACCESS_FBINFO(hw);
9797

98-
DBG(__FUNCTION__)
98+
DBG(__func__)
9999

100100
if (ACCESS_FBINFO(devflags.noinit)) {
101101
/* read MCLK and give up... */
@@ -338,7 +338,7 @@ void DAC1064_global_restore(WPMINFO2) {
338338
static int DAC1064_init_1(WPMINFO struct my_timming* m) {
339339
struct matrox_hw_state* hw = &ACCESS_FBINFO(hw);
340340

341-
DBG(__FUNCTION__)
341+
DBG(__func__)
342342

343343
memcpy(hw->DACreg, MGA1064_DAC, sizeof(MGA1064_DAC_regs));
344344
switch (ACCESS_FBINFO(fbcon).var.bits_per_pixel) {
@@ -374,7 +374,7 @@ static int DAC1064_init_1(WPMINFO struct my_timming* m) {
374374
static int DAC1064_init_2(WPMINFO struct my_timming* m) {
375375
struct matrox_hw_state* hw = &ACCESS_FBINFO(hw);
376376

377-
DBG(__FUNCTION__)
377+
DBG(__func__)
378378

379379
if (ACCESS_FBINFO(fbcon).var.bits_per_pixel > 16) { /* 256 entries */
380380
int i;
@@ -418,7 +418,7 @@ static void DAC1064_restore_1(WPMINFO2) {
418418

419419
CRITFLAGS
420420

421-
DBG(__FUNCTION__)
421+
DBG(__func__)
422422

423423
CRITBEGIN
424424

@@ -448,7 +448,7 @@ static void DAC1064_restore_2(WPMINFO2) {
448448
unsigned int i;
449449
#endif
450450

451-
DBG(__FUNCTION__)
451+
DBG(__func__)
452452

453453
#ifdef DEBUG
454454
dprintk(KERN_DEBUG "DAC1064regs ");
@@ -521,7 +521,7 @@ static struct matrox_altout g450out = {
521521
static int MGA1064_init(WPMINFO struct my_timming* m) {
522522
struct matrox_hw_state* hw = &ACCESS_FBINFO(hw);
523523

524-
DBG(__FUNCTION__)
524+
DBG(__func__)
525525

526526
if (DAC1064_init_1(PMINFO m)) return 1;
527527
if (matroxfb_vgaHWinit(PMINFO m)) return 1;
@@ -543,7 +543,7 @@ static int MGA1064_init(WPMINFO struct my_timming* m) {
543543
static int MGAG100_init(WPMINFO struct my_timming* m) {
544544
struct matrox_hw_state* hw = &ACCESS_FBINFO(hw);
545545

546-
DBG(__FUNCTION__)
546+
DBG(__func__)
547547

548548
if (DAC1064_init_1(PMINFO m)) return 1;
549549
hw->MXoptionReg &= ~0x2000;
@@ -565,7 +565,7 @@ static int MGAG100_init(WPMINFO struct my_timming* m) {
565565
#ifdef CONFIG_FB_MATROX_MYSTIQUE
566566
static void MGA1064_ramdac_init(WPMINFO2) {
567567

568-
DBG(__FUNCTION__)
568+
DBG(__func__)
569569

570570
/* ACCESS_FBINFO(features.DAC1064.vco_freq_min) = 120000; */
571571
ACCESS_FBINFO(features.pll.vco_freq_min) = 62000;
@@ -594,7 +594,7 @@ static void MGAG100_progPixClock(CPMINFO int flags, int m, int n, int p) {
594594
int selClk;
595595
int clk;
596596

597-
DBG(__FUNCTION__)
597+
DBG(__func__)
598598

599599
outDAC1064(PMINFO M1064_XPIXCLKCTRL, inDAC1064(PMINFO M1064_XPIXCLKCTRL) | M1064_XPIXCLKCTRL_DIS |
600600
M1064_XPIXCLKCTRL_PLL_UP);
@@ -636,7 +636,7 @@ static void MGAG100_progPixClock(CPMINFO int flags, int m, int n, int p) {
636636
static void MGAG100_setPixClock(CPMINFO int flags, int freq) {
637637
unsigned int m, n, p;
638638

639-
DBG(__FUNCTION__)
639+
DBG(__func__)
640640

641641
DAC1064_calcclock(PMINFO freq, ACCESS_FBINFO(max_pixel_clock), &m, &n, &p);
642642
MGAG100_progPixClock(PMINFO flags, m, n, p);
@@ -650,7 +650,7 @@ static int MGA1064_preinit(WPMINFO2) {
650650
2048, 0};
651651
struct matrox_hw_state* hw = &ACCESS_FBINFO(hw);
652652

653-
DBG(__FUNCTION__)
653+
DBG(__func__)
654654

655655
/* ACCESS_FBINFO(capable.cfb4) = 0; ... preinitialized by 0 */
656656
ACCESS_FBINFO(capable.text) = 1;
@@ -683,7 +683,7 @@ static int MGA1064_preinit(WPMINFO2) {
683683

684684
static void MGA1064_reset(WPMINFO2) {
685685

686-
DBG(__FUNCTION__);
686+
DBG(__func__);
687687

688688
MGA1064_ramdac_init(PMINFO2);
689689
}
@@ -819,7 +819,7 @@ static int MGAG100_preinit(WPMINFO2) {
819819
u_int32_t q;
820820
#endif
821821

822-
DBG(__FUNCTION__)
822+
DBG(__func__)
823823

824824
/* there are some instabilities if in_div > 19 && vco < 61000 */
825825
if (ACCESS_FBINFO(devflags.g450dac)) {
@@ -956,7 +956,7 @@ static void MGAG100_reset(WPMINFO2) {
956956
u_int8_t b;
957957
struct matrox_hw_state* hw = &ACCESS_FBINFO(hw);
958958

959-
DBG(__FUNCTION__)
959+
DBG(__func__)
960960

961961
{
962962
#ifdef G100_BROKEN_IBM_82351
@@ -1015,7 +1015,7 @@ static void MGA1064_restore(WPMINFO2) {
10151015

10161016
CRITFLAGS
10171017

1018-
DBG(__FUNCTION__)
1018+
DBG(__func__)
10191019

10201020
CRITBEGIN
10211021

@@ -1041,7 +1041,7 @@ static void MGAG100_restore(WPMINFO2) {
10411041

10421042
CRITFLAGS
10431043

1044-
DBG(__FUNCTION__)
1044+
DBG(__func__)
10451045

10461046
CRITBEGIN
10471047

0 commit comments

Comments
 (0)