Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[pandora-kernel.git] / drivers / firmware / dcdbas.c
index f235940..0b624e9 100644 (file)
@@ -63,7 +63,7 @@ static void smi_data_buf_free(void)
                return;
 
        dev_dbg(&dcdbas_pdev->dev, "%s: phys: %x size: %lu\n",
-               __FUNCTION__, smi_data_buf_phys_addr, smi_data_buf_size);
+               __func__, smi_data_buf_phys_addr, smi_data_buf_size);
 
        dma_free_coherent(&dcdbas_pdev->dev, smi_data_buf_size, smi_data_buf,
                          smi_data_buf_handle);
@@ -92,7 +92,7 @@ static int smi_data_buf_realloc(unsigned long size)
        if (!buf) {
                dev_dbg(&dcdbas_pdev->dev,
                        "%s: failed to allocate memory size %lu\n",
-                       __FUNCTION__, size);
+                       __func__, size);
                return -ENOMEM;
        }
        /* memory zeroed by dma_alloc_coherent */
@@ -110,7 +110,7 @@ static int smi_data_buf_realloc(unsigned long size)
        smi_data_buf_size = size;
 
        dev_dbg(&dcdbas_pdev->dev, "%s: phys: %x size: %lu\n",
-               __FUNCTION__, smi_data_buf_phys_addr, smi_data_buf_size);
+               __func__, smi_data_buf_phys_addr, smi_data_buf_size);
 
        return 0;
 }
@@ -254,20 +254,21 @@ static ssize_t host_control_on_shutdown_store(struct device *dev,
 static int smi_request(struct smi_cmd *smi_cmd)
 {
        cpumask_t old_mask;
+       cpumask_of_cpu_ptr(new_mask, 0);
        int ret = 0;
 
        if (smi_cmd->magic != SMI_CMD_MAGIC) {
                dev_info(&dcdbas_pdev->dev, "%s: invalid magic value\n",
-                        __FUNCTION__);
+                        __func__);
                return -EBADR;
        }
 
        /* SMI requires CPU 0 */
        old_mask = current->cpus_allowed;
-       set_cpus_allowed_ptr(current, &cpumask_of_cpu(0));
+       set_cpus_allowed_ptr(current, new_mask);
        if (smp_processor_id() != 0) {
                dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n",
-                       __FUNCTION__);
+                       __func__);
                ret = -EBUSY;
                goto out;
        }
@@ -428,7 +429,7 @@ static int host_control_smi(void)
 
        default:
                dev_dbg(&dcdbas_pdev->dev, "%s: invalid SMI type %u\n",
-                       __FUNCTION__, host_control_smi_type);
+                       __func__, host_control_smi_type);
                return -ENOSYS;
        }
 
@@ -456,13 +457,13 @@ static void dcdbas_host_control(void)
        host_control_action = HC_ACTION_NONE;
 
        if (!smi_data_buf) {
-               dev_dbg(&dcdbas_pdev->dev, "%s: no SMI buffer\n", __FUNCTION__);
+               dev_dbg(&dcdbas_pdev->dev, "%s: no SMI buffer\n", __func__);
                return;
        }
 
        if (smi_data_buf_size < sizeof(struct apm_cmd)) {
                dev_dbg(&dcdbas_pdev->dev, "%s: SMI buffer too small\n",
-                       __FUNCTION__);
+                       __func__);
                return;
        }