summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/siano/smscoreapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/siano/smscoreapi.c')
-rw-r--r--linux/drivers/media/dvb/siano/smscoreapi.c60
1 files changed, 1 insertions, 59 deletions
diff --git a/linux/drivers/media/dvb/siano/smscoreapi.c b/linux/drivers/media/dvb/siano/smscoreapi.c
index dda3cf853..0589a4759 100644
--- a/linux/drivers/media/dvb/siano/smscoreapi.c
+++ b/linux/drivers/media/dvb/siano/smscoreapi.c
@@ -200,55 +200,6 @@ void smscore_registry_settype(char *devpath, enum sms_device_type_st type)
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-void *kzalloc(size_t size, int flags)
-{
- void *ret = kmalloc(size, flags);
- if (ret)
- memset(ret, 0, size);
- return ret;
-}
-
-static inline unsigned long kvirt_to_pa(unsigned long adr)
-{
- unsigned long kva, ret;
-
- kva = (unsigned long) page_address(virt_to_page((void *)adr));
- kva |= adr & (PAGE_SIZE-1); /* restore the offset */
- ret = __pa(kva);
- return ret;
-}
-
-unsigned long wait_for_completion_timeout(struct completion *x,
- unsigned long timeout)
-{
- might_sleep();
-
- spin_lock_irq(&x->wait.lock);
- if (!x->done) {
- DECLARE_WAITQUEUE(wait, current);
-
- wait.flags |= WQ_FLAG_EXCLUSIVE;
- __add_wait_queue_tail(&x->wait, &wait);
- do {
- __set_current_state(TASK_UNINTERRUPTIBLE);
- spin_unlock_irq(&x->wait.lock);
- timeout = schedule_timeout(timeout);
- spin_lock_irq(&x->wait.lock);
- if (!timeout) {
- __remove_wait_queue(&x->wait, &wait);
- goto out;
- }
- } while (!x->done);
- __remove_wait_queue(&x->wait, &wait);
- }
- x->done--;
-out:
- spin_unlock_irq(&x->wait.lock);
- return timeout;
-}
-#endif
-
void list_add_locked(struct list_head *new, struct list_head *head,
spinlock_t *lock)
{
@@ -640,8 +591,6 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
loadfirmware_t loadfirmware_handler)
{
int rc = -ENOENT;
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
const struct firmware *fw;
u8 *fw_buffer;
@@ -677,7 +626,6 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
}
release_firmware(fw);
-#endif
return rc;
}
@@ -1287,15 +1235,9 @@ int smscore_map_common_buffer(struct smscore_device_t *coredev,
return -EINVAL;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
- if (remap_page_range(vma, start, coredev->common_buffer_phys, size,
- vma->vm_page_prot))
-#else
if (remap_pfn_range(vma, start,
coredev->common_buffer_phys >> PAGE_SHIFT,
- size, pgprot_noncached(vma->vm_page_prot)))
-#endif
- {
+ size, pgprot_noncached(vma->vm_page_prot))) {
printk(KERN_INFO "%s remap_page_range failed\n", __func__);
return -EAGAIN;
}