diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-05-02 08:48:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 20:59:08 -0400 |
commit | d778c9a400e569029c8a48bc898c70780d6d2c1c (patch) | |
tree | d04ba017786a212cc0075cc9643bf77582a2e001 /drivers/video/ps3fb.c | |
parent | 640729014e073e6e2de1f513b2856b81aa7d84e9 (diff) |
ps3fb: Use __func__ instead of __FUNCTION__
ps3fb: Replace GNU extension `__FUNCTION__' by C99 `__func__'
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/ps3fb.c')
-rw-r--r-- | drivers/video/ps3fb.c | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index 9fe64829aa81..07d1979bc23e 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <asm/ps3.h> | 47 | #include <asm/ps3.h> |
48 | 48 | ||
49 | #ifdef PS3FB_DEBUG | 49 | #ifdef PS3FB_DEBUG |
50 | #define DPRINTK(fmt, args...) printk("%s: " fmt, __FUNCTION__ , ##args) | 50 | #define DPRINTK(fmt, args...) printk("%s: " fmt, __func__ , ##args) |
51 | #else | 51 | #else |
52 | #define DPRINTK(fmt, args...) | 52 | #define DPRINTK(fmt, args...) |
53 | #endif | 53 | #endif |
@@ -396,7 +396,7 @@ static int ps3fb_sync(u32 frame) | |||
396 | 396 | ||
397 | if (frame > ps3fb.num_frames - 1) { | 397 | if (frame > ps3fb.num_frames - 1) { |
398 | printk(KERN_WARNING "%s: invalid frame number (%u)\n", | 398 | printk(KERN_WARNING "%s: invalid frame number (%u)\n", |
399 | __FUNCTION__, frame); | 399 | __func__, frame); |
400 | return -EINVAL; | 400 | return -EINVAL; |
401 | } | 401 | } |
402 | offset = xres * yres * BPP * frame; | 402 | offset = xres * yres * BPP * frame; |
@@ -409,23 +409,26 @@ static int ps3fb_sync(u32 frame) | |||
409 | (xres << 16) | yres, | 409 | (xres << 16) | yres, |
410 | xres * BPP); /* line_length */ | 410 | xres * BPP); /* line_length */ |
411 | if (status) | 411 | if (status) |
412 | printk(KERN_ERR "%s: lv1_gpu_context_attribute FB_BLIT failed: %d\n", | 412 | printk(KERN_ERR |
413 | __FUNCTION__, status); | 413 | "%s: lv1_gpu_context_attribute FB_BLIT failed: %d\n", |
414 | __func__, status); | ||
414 | #ifdef HEAD_A | 415 | #ifdef HEAD_A |
415 | status = lv1_gpu_context_attribute(ps3fb.context_handle, | 416 | status = lv1_gpu_context_attribute(ps3fb.context_handle, |
416 | L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, | 417 | L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, |
417 | 0, offset, 0, 0); | 418 | 0, offset, 0, 0); |
418 | if (status) | 419 | if (status) |
419 | printk(KERN_ERR "%s: lv1_gpu_context_attribute FLIP failed: %d\n", | 420 | printk(KERN_ERR |
420 | __FUNCTION__, status); | 421 | "%s: lv1_gpu_context_attribute FLIP failed: %d\n", |
422 | __func__, status); | ||
421 | #endif | 423 | #endif |
422 | #ifdef HEAD_B | 424 | #ifdef HEAD_B |
423 | status = lv1_gpu_context_attribute(ps3fb.context_handle, | 425 | status = lv1_gpu_context_attribute(ps3fb.context_handle, |
424 | L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, | 426 | L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, |
425 | 1, offset, 0, 0); | 427 | 1, offset, 0, 0); |
426 | if (status) | 428 | if (status) |
427 | printk(KERN_ERR "%s: lv1_gpu_context_attribute FLIP failed: %d\n", | 429 | printk(KERN_ERR |
428 | __FUNCTION__, status); | 430 | "%s: lv1_gpu_context_attribute FLIP failed: %d\n", |
431 | __func__, status); | ||
429 | #endif | 432 | #endif |
430 | return 0; | 433 | return 0; |
431 | } | 434 | } |
@@ -634,7 +637,7 @@ static int ps3fb_blank(int blank, struct fb_info *info) | |||
634 | { | 637 | { |
635 | int retval; | 638 | int retval; |
636 | 639 | ||
637 | DPRINTK("%s: blank:%d\n", __FUNCTION__, blank); | 640 | DPRINTK("%s: blank:%d\n", __func__, blank); |
638 | switch (blank) { | 641 | switch (blank) { |
639 | case FB_BLANK_POWERDOWN: | 642 | case FB_BLANK_POWERDOWN: |
640 | case FB_BLANK_HSYNC_SUSPEND: | 643 | case FB_BLANK_HSYNC_SUSPEND: |
@@ -830,7 +833,7 @@ static irqreturn_t ps3fb_vsync_interrupt(int irq, void *ptr) | |||
830 | status = lv1_gpu_context_intr(ps3fb.context_handle, &v1); | 833 | status = lv1_gpu_context_intr(ps3fb.context_handle, &v1); |
831 | if (status) { | 834 | if (status) { |
832 | printk(KERN_ERR "%s: lv1_gpu_context_intr failed: %d\n", | 835 | printk(KERN_ERR "%s: lv1_gpu_context_intr failed: %d\n", |
833 | __FUNCTION__, status); | 836 | __func__, status); |
834 | return IRQ_NONE; | 837 | return IRQ_NONE; |
835 | } | 838 | } |
836 | 839 | ||
@@ -889,7 +892,7 @@ static int ps3fb_vsync_settings(struct gpu_driver_info *dinfo, void *dev) | |||
889 | dinfo->nvcore_frequency/1000000, dinfo->memory_frequency/1000000); | 892 | dinfo->nvcore_frequency/1000000, dinfo->memory_frequency/1000000); |
890 | 893 | ||
891 | if (dinfo->version_driver != GPU_DRIVER_INFO_VERSION) { | 894 | if (dinfo->version_driver != GPU_DRIVER_INFO_VERSION) { |
892 | printk(KERN_ERR "%s: version_driver err:%x\n", __FUNCTION__, | 895 | printk(KERN_ERR "%s: version_driver err:%x\n", __func__, |
893 | dinfo->version_driver); | 896 | dinfo->version_driver); |
894 | return -EINVAL; | 897 | return -EINVAL; |
895 | } | 898 | } |
@@ -898,7 +901,7 @@ static int ps3fb_vsync_settings(struct gpu_driver_info *dinfo, void *dev) | |||
898 | error = ps3_alloc_irq(PS3_BINDING_CPU_ANY, dinfo->irq.irq_outlet, | 901 | error = ps3_alloc_irq(PS3_BINDING_CPU_ANY, dinfo->irq.irq_outlet, |
899 | &ps3fb.irq_no); | 902 | &ps3fb.irq_no); |
900 | if (error) { | 903 | if (error) { |
901 | printk(KERN_ERR "%s: ps3_alloc_irq failed %d\n", __FUNCTION__, | 904 | printk(KERN_ERR "%s: ps3_alloc_irq failed %d\n", __func__, |
902 | error); | 905 | error); |
903 | return error; | 906 | return error; |
904 | } | 907 | } |
@@ -906,7 +909,7 @@ static int ps3fb_vsync_settings(struct gpu_driver_info *dinfo, void *dev) | |||
906 | error = request_irq(ps3fb.irq_no, ps3fb_vsync_interrupt, IRQF_DISABLED, | 909 | error = request_irq(ps3fb.irq_no, ps3fb_vsync_interrupt, IRQF_DISABLED, |
907 | "ps3fb vsync", ps3fb.dev); | 910 | "ps3fb vsync", ps3fb.dev); |
908 | if (error) { | 911 | if (error) { |
909 | printk(KERN_ERR "%s: request_irq failed %d\n", __FUNCTION__, | 912 | printk(KERN_ERR "%s: request_irq failed %d\n", __func__, |
910 | error); | 913 | error); |
911 | ps3_free_irq(ps3fb.irq_no); | 914 | ps3_free_irq(ps3fb.irq_no); |
912 | return error; | 915 | return error; |
@@ -925,7 +928,7 @@ static int ps3fb_xdr_settings(u64 xdr_lpar) | |||
925 | xdr_lpar, ps3fb_videomemory.size, 0); | 928 | xdr_lpar, ps3fb_videomemory.size, 0); |
926 | if (status) { | 929 | if (status) { |
927 | printk(KERN_ERR "%s: lv1_gpu_context_iomap failed: %d\n", | 930 | printk(KERN_ERR "%s: lv1_gpu_context_iomap failed: %d\n", |
928 | __FUNCTION__, status); | 931 | __func__, status); |
929 | return -ENXIO; | 932 | return -ENXIO; |
930 | } | 933 | } |
931 | DPRINTK("video:%p xdr_ea:%p ioif:%lx lpar:%lx phys:%lx size:%lx\n", | 934 | DPRINTK("video:%p xdr_ea:%p ioif:%lx lpar:%lx phys:%lx size:%lx\n", |
@@ -937,8 +940,9 @@ static int ps3fb_xdr_settings(u64 xdr_lpar) | |||
937 | xdr_lpar, ps3fb_videomemory.size, | 940 | xdr_lpar, ps3fb_videomemory.size, |
938 | GPU_IOIF, 0); | 941 | GPU_IOIF, 0); |
939 | if (status) { | 942 | if (status) { |
940 | printk(KERN_ERR "%s: lv1_gpu_context_attribute FB_SETUP failed: %d\n", | 943 | printk(KERN_ERR |
941 | __FUNCTION__, status); | 944 | "%s: lv1_gpu_context_attribute FB_SETUP failed: %d\n", |
945 | __func__, status); | ||
942 | return -ENXIO; | 946 | return -ENXIO; |
943 | } | 947 | } |
944 | return 0; | 948 | return 0; |
@@ -985,7 +989,7 @@ static int __init ps3fb_probe(struct platform_device *dev) | |||
985 | &ps3fb.memory_handle, &ddr_lpar); | 989 | &ps3fb.memory_handle, &ddr_lpar); |
986 | if (status) { | 990 | if (status) { |
987 | printk(KERN_ERR "%s: lv1_gpu_memory_allocate failed: %d\n", | 991 | printk(KERN_ERR "%s: lv1_gpu_memory_allocate failed: %d\n", |
988 | __FUNCTION__, status); | 992 | __func__, status); |
989 | goto err; | 993 | goto err; |
990 | } | 994 | } |
991 | DPRINTK("ddr:lpar:0x%lx\n", ddr_lpar); | 995 | DPRINTK("ddr:lpar:0x%lx\n", ddr_lpar); |
@@ -996,14 +1000,14 @@ static int __init ps3fb_probe(struct platform_device *dev) | |||
996 | &lpar_reports, &lpar_reports_size); | 1000 | &lpar_reports, &lpar_reports_size); |
997 | if (status) { | 1001 | if (status) { |
998 | printk(KERN_ERR "%s: lv1_gpu_context_attribute failed: %d\n", | 1002 | printk(KERN_ERR "%s: lv1_gpu_context_attribute failed: %d\n", |
999 | __FUNCTION__, status); | 1003 | __func__, status); |
1000 | goto err_gpu_memory_free; | 1004 | goto err_gpu_memory_free; |
1001 | } | 1005 | } |
1002 | 1006 | ||
1003 | /* vsync interrupt */ | 1007 | /* vsync interrupt */ |
1004 | ps3fb.dinfo = ioremap(lpar_driver_info, 128 * 1024); | 1008 | ps3fb.dinfo = ioremap(lpar_driver_info, 128 * 1024); |
1005 | if (!ps3fb.dinfo) { | 1009 | if (!ps3fb.dinfo) { |
1006 | printk(KERN_ERR "%s: ioremap failed\n", __FUNCTION__); | 1010 | printk(KERN_ERR "%s: ioremap failed\n", __func__); |
1007 | goto err_gpu_context_free; | 1011 | goto err_gpu_context_free; |
1008 | } | 1012 | } |
1009 | 1013 | ||
@@ -1162,8 +1166,9 @@ int ps3fb_set_sync(void) | |||
1162 | L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC, | 1166 | L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC, |
1163 | 0, L1GPU_DISPLAY_SYNC_VSYNC, 0, 0); | 1167 | 0, L1GPU_DISPLAY_SYNC_VSYNC, 0, 0); |
1164 | if (status) { | 1168 | if (status) { |
1165 | printk(KERN_ERR "%s: lv1_gpu_context_attribute DISPLAY_SYNC failed: %d\n", | 1169 | printk(KERN_ERR |
1166 | __FUNCTION__, status); | 1170 | "%s: lv1_gpu_context_attribute DISPLAY_SYNC failed: %d\n", |
1171 | __func__, status); | ||
1167 | return -1; | 1172 | return -1; |
1168 | } | 1173 | } |
1169 | #endif | 1174 | #endif |
@@ -1173,8 +1178,9 @@ int ps3fb_set_sync(void) | |||
1173 | 1, L1GPU_DISPLAY_SYNC_VSYNC, 0, 0); | 1178 | 1, L1GPU_DISPLAY_SYNC_VSYNC, 0, 0); |
1174 | 1179 | ||
1175 | if (status) { | 1180 | if (status) { |
1176 | printk(KERN_ERR "%s: lv1_gpu_context_attribute DISPLAY_MODE failed: %d\n", | 1181 | printk(KERN_ERR |
1177 | __FUNCTION__, status); | 1182 | "%s: lv1_gpu_context_attribute DISPLAY_MODE failed: %d\n", |
1183 | __func__, status); | ||
1178 | return -1; | 1184 | return -1; |
1179 | } | 1185 | } |
1180 | #endif | 1186 | #endif |
@@ -1199,7 +1205,7 @@ static int __init ps3fb_init(void) | |||
1199 | 1205 | ||
1200 | error = ps3av_dev_open(); | 1206 | error = ps3av_dev_open(); |
1201 | if (error) { | 1207 | if (error) { |
1202 | printk(KERN_ERR "%s: ps3av_dev_open failed\n", __FUNCTION__); | 1208 | printk(KERN_ERR "%s: ps3av_dev_open failed\n", __func__); |
1203 | goto err; | 1209 | goto err; |
1204 | } | 1210 | } |
1205 | 1211 | ||