Changeset 24286


Ignore:
Timestamp:
2010-12-06T18:01:10+01:00 (7 years ago)
Author:
hauke
Message:

kernel: fix cryptodev with kernel >= 2.6.35

The fix is from http://sourceforge.net/mailarchive/forum.php?thread_name=20100906035717.GA7562%40mcafee.com&forum_name=ocf-linux-users

Thank you tripolar for reporting the issue and finding a solution for it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/files/crypto/ocf/cryptodev.c

    r23290 r24286  
    978978 
    979979        dprintk("%s()\n", __FUNCTION__); 
     980#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) 
     981        /* 
     982         * on 2.6.35 private_data points to a miscdevice structure, we override 
     983         * it,  which is currently safe to do. 
     984         */ 
    980985        if (filp->private_data) { 
    981                 printk("cryptodev: Private data already exists !\n"); 
    982                 return(0); 
    983         } 
     986                printk("cryptodev: Private data already exists - %p!\n", filp->private_data); 
     987                return(-ENODEV); 
     988        } 
     989#endif 
    984990 
    985991        fcr = kmalloc(sizeof(*fcr), GFP_KERNEL); 
Note: See TracChangeset for help on using the changeset viewer.