/* note: adds function name and KERN_DEBUG */
 #ifdef DEBUGGING
 #define DEBPRINT(fmt, args...) \
-               printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, ## args)
+               printk(KERN_DEBUG "%s: " fmt, __func__, ## args)
 #else
 #define DEBPRINT(fmt, args...) do {} while (0)
 #endif /* DEBUGGING */
        if (ACPI_FAILURE(status)) {
                printk(KERN_DEBUG
                       "%s: Run _GTF error: status = 0x%x\n",
-                      __FUNCTION__, status);
+                      __func__, status);
                goto out;
        }
 
            out_obj->buffer.length % REGS_PER_GTF) {
                printk(KERN_ERR
                       "%s: unexpected GTF length (%d) or addr (0x%p)\n",
-                      __FUNCTION__, out_obj->buffer.length,
+                      __func__, out_obj->buffer.length,
                       out_obj->buffer.pointer);
                err = -ENOENT;
                kfree(output.pointer);
        err = ide_no_data_taskfile(drive, &args);
        if (err)
                printk(KERN_ERR "%s: ide_no_data_taskfile failed: %u\n",
-                      __FUNCTION__, err);
+                      __func__, err);
 
        return err;
 }
 
        if (gtf_length % REGS_PER_GTF) {
                printk(KERN_ERR "%s: unexpected GTF length (%d)\n",
-                      __FUNCTION__, gtf_length);
+                      __func__, gtf_length);
                goto out;
        }
 
                printk(KERN_ERR
                        "%s: unexpected _GTM length (0x%x)[should be 0x%zx] or "
                        "addr (0x%p)\n",
-                       __FUNCTION__, out_obj->buffer.length,
+                       __func__, out_obj->buffer.length,
                        sizeof(struct GTM_buffer), out_obj->buffer.pointer);
                return;
        }
 
                return 1;
        if (!drive->waiting_for_dma)
                printk(KERN_WARNING "%s: (%s) called while not waiting\n",
-                       drive->name, __FUNCTION__);
+                       drive->name, __func__);
        return 0;
 }
 #else
 
                        mode = XFER_PIO_4;
        }
 
-//     printk("%s: mode 0x%02x, speed 0x%02x\n", __FUNCTION__, mode, speed);
+/*     printk("%s: mode 0x%02x, speed 0x%02x\n", __func__, mode, speed); */
 
        return min(speed, mode);
 }
 
        ret = device_register(&hwif->gendev);
        if (ret < 0) {
                printk(KERN_WARNING "IDE: %s: device_register error: %d\n",
-                       __FUNCTION__, ret);
+                       __func__, ret);
                goto out;
        }
 
 
        err = device_attach(dev);
        if (err < 0)
                printk(KERN_WARNING "IDE: %s: device_attach error: %d\n",
-                       __FUNCTION__, err);
+                       __func__, err);
        drive->driver_req[0] = 0;
        if (dev->driver == NULL) {
                err = device_attach(dev);
                if (err < 0)
                        printk(KERN_WARNING
                                "IDE: %s: device_attach(2) error: %d\n",
-                               __FUNCTION__, err);
+                               __func__, err);
        }
        if (dev->driver && !strcmp(dev->driver->name, driver))
                ret = 0;
        err = bus_for_each_drv(&ide_bus_type, NULL, s, proc_print_driver);
        if (err < 0)
                printk(KERN_WARNING "IDE: %s: bus_for_each_drv error: %d\n",
-                       __FUNCTION__, err);
+                       __func__, err);
        return 0;
 }
 
 
                if (__pci_register_driver(d, d->driver.owner,
                                          d->driver.mod_name))
                        printk(KERN_ERR "%s: failed to register %s driver\n",
-                                       __FUNCTION__, d->driver.mod_name);
+                                       __func__, d->driver.mod_name);
        }
 
        return 0;
 
 
        /* Error? */
        if (stat & ERR_STAT)
-               return task_error(drive, rq, __FUNCTION__, stat);
+               return task_error(drive, rq, __func__, stat);
 
        /* Didn't want any data? Odd. */
        if (!(stat & DRQ_STAT))
        if (!hwif->nleft) {
                stat = wait_drive_not_busy(drive);
                if (!OK_STAT(stat, 0, BAD_STAT))
-                       return task_error(drive, rq, __FUNCTION__, stat);
+                       return task_error(drive, rq, __func__, stat);
                task_end_request(drive, rq, stat);
                return ide_stopped;
        }
        u8 stat = ide_read_status(drive);
 
        if (!OK_STAT(stat, DRIVE_READY, drive->bad_wstat))
-               return task_error(drive, rq, __FUNCTION__, stat);
+               return task_error(drive, rq, __func__, stat);
 
        /* Deal with unexpected ATA data phase. */
        if (((stat & DRQ_STAT) == 0) ^ !hwif->nleft)
-               return task_error(drive, rq, __FUNCTION__, stat);
+               return task_error(drive, rq, __func__, stat);
 
        if (!hwif->nleft) {
                task_end_request(drive, rq, stat);
                                /* (hs): give up if multcount is not set */
                                printk(KERN_ERR "%s: %s Multimode Write " \
                                        "multcount is not set\n",
-                                       drive->name, __FUNCTION__);
+                                       drive->name, __func__);
                                err = -EPERM;
                                goto abort;
                        }
                                /* (hs): give up if multcount is not set */
                                printk(KERN_ERR "%s: %s Multimode Read failure " \
                                        "multcount is not set\n",
-                                       drive->name, __FUNCTION__);
+                                       drive->name, __func__);
                                err = -EPERM;
                                goto abort;
                        }
 
 
        if (!request_region(HT_CONFIG_PORT, 1, DRV_NAME)) {
                printk(KERN_NOTICE "%s: HT_CONFIG_PORT not found\n",
-                       __FUNCTION__);
+                       __func__);
                return -ENODEV;
        }
 
        if (!try_to_init_ht6560b()) {
-               printk(KERN_NOTICE "%s: HBA not found\n", __FUNCTION__);
+               printk(KERN_NOTICE "%s: HBA not found\n", __func__);
                goto release_region;
        }
 
 
 
        if(!put_dest_flags(ahwif->rx_chan, (void*)addr, count << 1, 
                           DDMA_FLAGS_NOIE)) {
-               printk(KERN_ERR "%s failed %d\n", __FUNCTION__, __LINE__);
+               printk(KERN_ERR "%s failed %d\n", __func__, __LINE__);
                return;
        }
        ctp = *((chan_tab_t **)ahwif->rx_chan);
 
        if(!put_source_flags(ahwif->tx_chan, (void*)addr,
                             count << 1, DDMA_FLAGS_NOIE)) {
-               printk(KERN_ERR "%s failed %d\n", __FUNCTION__, __LINE__);
+               printk(KERN_ERR "%s failed %d\n", __func__, __LINE__);
                return;
        }
        ctp = *((chan_tab_t **)ahwif->tx_chan);
                                                     (void*) sg_virt(sg),
                                                     tc, flags)) { 
                                        printk(KERN_ERR "%s failed %d\n", 
-                                              __FUNCTION__, __LINE__);
+                                              __func__, __LINE__);
                                }
                        } else 
                        {
                                                   (void*) sg_virt(sg),
                                                   tc, flags)) { 
                                        printk(KERN_ERR "%s failed %d\n", 
-                                              __FUNCTION__, __LINE__);
+                                              __func__, __LINE__);
                                }
                        }
 
 
        pci_read_config_byte(dev, 0x52, &mcr3);
        pci_read_config_byte(dev, 0x5a, &scr1);
        printk("%s: (%s)  mcr1=0x%02x, mcr3=0x%02x, scr1=0x%02x\n",
-               drive->name, __FUNCTION__, mcr1, mcr3, scr1);
+               drive->name, __func__, mcr1, mcr3, scr1);
        if (scr1 & 0x10)
                pci_write_config_byte(dev, 0x5a, scr1 & ~0x10);
        ide_dma_lost_irq(drive);
 
        if (!drive->waiting_for_dma)
                printk(KERN_WARNING "%s: (%s) called while not waiting\n",
-                               drive->name, __FUNCTION__);
+                               drive->name, __func__);
        return 0;
 }
 
 
 #undef DEBUG
 
 #ifdef DEBUG
-#define DBG(fmt, args...) printk("%s: " fmt, __FUNCTION__, ## args)
+#define DBG(fmt, args...) printk("%s: " fmt, __func__, ## args)
 #else
 #define DBG(fmt, args...)
 #endif
 
 
        if (!drive->waiting_for_dma)
                printk(KERN_WARNING "%s: (%s) called while not waiting\n",
-                       drive->name, __FUNCTION__);
+                       drive->name, __func__);
        return 0;
 }
 
 
                        printk(KERN_ERR
                               "%s(%s) : PCI Bus Error when doing DMA:"
                                   " status-cmd reg is 0x%x\n",
-                              __FUNCTION__, drive->name, pci_stat_cmd_reg);
+                              __func__, drive->name, pci_stat_cmd_reg);
                        printk(KERN_ERR
                               "%s(%s) : PCI Error Address is 0x%x%x\n",
-                              __FUNCTION__, drive->name,
+                              __func__, drive->name,
                               pci_err_addr_high, pci_err_addr_low);
                        /* Clear the PCI Error indicator */
                        pci_write_config_dword(dev, PCI_COMMAND, 0x00000146);
                printk(KERN_ERR
                       "%s(%s): IOC4 DMA STOP bit is still 1 :"
                       "ioc4_dma_reg 0x%x\n",
-                      __FUNCTION__, drive->name, ioc4_dma);
+                      __func__, drive->name, ioc4_dma);
                dma_stat = 1;
        }
 
                udelay(1);
        }
        if (!valid) {
-               printk(KERN_ERR "%s(%s) : DMA incomplete\n", __FUNCTION__,
+               printk(KERN_ERR "%s(%s) : DMA incomplete\n", __func__,
                       drive->name);
                dma_stat = 1;
        }
                        printk(KERN_ERR
                               "%s(%s): WARNING!! byte_count_dev %d "
                               "!= byte_count_mem %d\n",
-                              __FUNCTION__, drive->name, bc_dev, bc_mem);
+                              __func__, drive->name, bc_dev, bc_mem);
                }
        }
 
                printk(KERN_ERR
                       "%s(%s) -- ERROR, Addresses 0x%p to 0x%p "
                       "ALREADY in use\n",
-                      __FUNCTION__, hwif->name, (void *) dma_base,
+                      __func__, hwif->name, (void *) dma_base,
                       (void *) dma_base + num_ports - 1);
                return -1;
        }
        if (virt_dma_base == NULL) {
                printk(KERN_ERR
                       "%s(%s) -- ERROR, Unable to map addresses 0x%lx to 0x%lx\n",
-                      __FUNCTION__, hwif->name, dma_base, dma_base + num_ports - 1);
+                      __func__, hwif->name, dma_base, dma_base + num_ports - 1);
                goto dma_remap_failure;
        }
        hwif->dma_base = (unsigned long) virt_dma_base;
                            hwif->dmatable_cpu, hwif->dmatable_dma);
        printk(KERN_INFO
               "%s() -- Error! Unable to allocate DMA Maps for drive %s\n",
-              __FUNCTION__, hwif->name);
+              __func__, hwif->name);
        printk(KERN_INFO
               "Changing from DMA to PIO mode for Drive %s\n", hwif->name);
 
        if (ioc4_dma & IOC4_S_DMA_ACTIVE) {
                printk(KERN_WARNING
                        "%s(%s):Warning!! DMA from previous transfer was still active\n",
-                      __FUNCTION__, drive->name);
+                      __func__, drive->name);
                writel(IOC4_S_DMA_STOP, (void __iomem *)ioc4_dma_addr);
                ioc4_dma = sgiioc4_ide_dma_stop(hwif, dma_base);
 
                if (ioc4_dma & IOC4_S_DMA_STOP)
                        printk(KERN_ERR
                               "%s(%s) : IOC4 Dma STOP bit is still 1\n",
-                              __FUNCTION__, drive->name);
+                              __func__, drive->name);
        }
 
        ioc4_dma = readl((void __iomem *)ioc4_dma_addr);
                printk(KERN_WARNING
                       "%s(%s) : Warning!! - DMA Error during Previous"
                       " transfer | status 0x%x\n",
-                      __FUNCTION__, drive->name, ioc4_dma);
+                      __func__, drive->name, ioc4_dma);
                writel(IOC4_S_DMA_STOP, (void __iomem *)ioc4_dma_addr);
                ioc4_dma = sgiioc4_ide_dma_stop(hwif, dma_base);
 
                if (ioc4_dma & IOC4_S_DMA_STOP)
                        printk(KERN_ERR
                               "%s(%s) : IOC4 DMA STOP bit is still 1\n",
-                              __FUNCTION__, drive->name);
+                              __func__, drive->name);
        }
 
        /* Address of the Scatter Gather List */
                printk(KERN_ERR
                        "%s : %s -- ERROR, Addresses "
                        "0x%p to 0x%p ALREADY in use\n",
-                      __FUNCTION__, hwif->name, (void *) cmd_phys_base,
+                      __func__, hwif->name, (void *) cmd_phys_base,
                       (void *) cmd_phys_base + IOC4_CMD_CTL_BLK_SIZE);
                return -ENOMEM;
        }
 
                        printk(KERN_WARNING "%s: sata_error = 0x%08x, "
                                "watchdog = %d, %s\n",
                                drive->name, sata_error, watchdog,
-                               __FUNCTION__);
+                               __func__);
 
                } else {
                        watchdog = (ext_stat & 0x8000) ? 1 : 0;
 
        struct pci_dev *dev     = to_pci_dev(hwif->dev);
        int reg                 = 0x44 + drive->dn * 4;
 
-       DBG(("%s(drive:%s)\n", __FUNCTION__, drive->name));
+       DBG(("%s(drive:%s)\n", __func__, drive->name));
 
        pci_write_config_word(dev, reg, drive->drive_data >> 16);
 
        int reg                 = 0x44 + drive->dn * 4;
        int ret;
 
-       DBG(("%s(drive:%s)\n", __FUNCTION__, drive->name));
+       DBG(("%s(drive:%s)\n", __func__, drive->name));
 
        ret = __ide_dma_end(drive);
 
 
 #elif defined(CONFIG_IDE_EXT_DIRECT)
 
        printk("%s[%d] %s: not implemented yet!\n",
-               __FILE__,__LINE__,__FUNCTION__);
+               __FILE__, __LINE__, __func__);
 #endif /* defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_IDE_8xx_PCMCIA */
 }