if (platform == 0)
return -ENODEV;
- qos = pm_qos_add_request(PM_QOS_CPU_DMA_LATENCY,
- PM_QOS_DEFAULT_VALUE);
+ qos = kzalloc(sizeof(struct pm_qos_request_list), GFP_KERNEL);
+ if (!qos)
+ return -ENOMEM;
+
+ pm_qos_add_request(qos, PM_QOS_CPU_DMA_LATENCY,
+ PM_QOS_DEFAULT_VALUE);
return pci_register_driver(&ipc_driver);
switch (cmd) {
case INTEL_SCU_IPC_FW_UPDATE:
{
- u8 *fwbuf = kmalloc(MAX_FW_SIZE, GFP_KERNEL);
- if (fwbuf == NULL)
- return -ENOMEM;
- if (copy_from_user(fwbuf, (u8 *)arg, MAX_FW_SIZE)) {
+ if (platform == MRST_CPU_CHIP_LINCROFT) {
+ u8 *fwbuf = kmalloc(MAX_FW_SIZE, GFP_KERNEL);
+ if (fwbuf == NULL)
+ return -ENOMEM;
+ if (copy_from_user(fwbuf, (u8 *)arg, MAX_FW_SIZE)) {
+ kfree(fwbuf);
+ return -EFAULT;
+ }
+ ret = intel_scu_ipc_mrstfw_update(fwbuf, MAX_FW_SIZE);
kfree(fwbuf);
- return -EFAULT;
}
- ret = intel_scu_ipc_mrstfw_update(fwbuf, MAX_FW_SIZE);
- kfree(fwbuf);
break;
}
case INTEL_SCU_IPC_READ_RR_FROM_OSNIB:
return ret;
}
}
+ break;
}
case INTEL_SCU_IPC_FW_REVISION_GET:
{