X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fblock%2Facsi_slm.c;h=e04be94d195c5ecca5a8faf9cb0ca6fc24d9b09c;hb=a2f44b27303a5353859d77a3e96a1d3f33f56ab7;hp=e3be8c31a74ccb5dbc8ef1005682239cd5d2d667;hpb=daddc0d38b3571bed170afa273a49a0eba090c1e;p=linux-2.6.git diff --git a/drivers/block/acsi_slm.c b/drivers/block/acsi_slm.c index e3be8c31a..e04be94d1 100644 --- a/drivers/block/acsi_slm.c +++ b/drivers/block/acsi_slm.c @@ -65,7 +65,6 @@ not be guaranteed. There are several ways to assure this: #include #include #include -#include #include #include @@ -247,7 +246,7 @@ static int slm_getstats( char *buffer, int device ); static ssize_t slm_read( struct file* file, char *buf, size_t count, loff_t *ppos ); static void start_print( int device ); -static irqreturn_t slm_interrupt(int irc, void *data, struct pt_regs *fp); +static irqreturn_t slm_interrupt(int irc, void *data); static void slm_test_ready( unsigned long dummy ); static void set_dma_addr( unsigned long paddr ); static unsigned long get_dma_addr( void ); @@ -268,7 +267,7 @@ static int slm_get_pagesize( int device, int *w, int *h ); /************************* End of Prototypes **************************/ -static struct timer_list slm_timer = TIMER_INITIALIZER(slm_test_ready, 0, 0); +static DEFINE_TIMER(slm_timer, slm_test_ready, 0, 0); static struct file_operations slm_fops = { .owner = THIS_MODULE, @@ -364,13 +363,11 @@ static ssize_t slm_read( struct file *file, char *buf, size_t count, loff_t *ppos ) { - struct inode *node = file->f_dentry->d_inode; + struct inode *node = file->f_path.dentry->d_inode; unsigned long page; int length; int end; - if (count < 0) - return( -EINVAL ); if (!(page = __get_free_page( GFP_KERNEL ))) return( -ENOMEM ); @@ -455,7 +452,7 @@ static void start_print( int device ) /* Only called when an error happened or at the end of a page */ -static irqreturn_t slm_interrupt(int irc, void *data, struct pt_regs *fp) +static irqreturn_t slm_interrupt(int irc, void *data) { unsigned long addr; int stat; @@ -621,7 +618,7 @@ static ssize_t slm_write( struct file *file, const char *buf, size_t count, loff_t *ppos ) { - struct inode *node = file->f_dentry->d_inode; + struct inode *node = file->f_path.dentry->d_inode; int device = iminor(node); int n, filled, w, h; @@ -1007,11 +1004,6 @@ int slm_init( void ) BufferP = SLMBuffer; SLMState = IDLE; - devfs_mk_dir("slm"); - for (i = 0; i < MAX_SLM; i++) { - devfs_mk_cdev(MKDEV(ACSI_MAJOR, i), - S_IFCHR|S_IRUSR|S_IWUSR, "slm/%d", i); - } return 0; } @@ -1034,10 +1026,6 @@ int init_module(void) void cleanup_module(void) { - int i; - for (i = 0; i < MAX_SLM; i++) - devfs_remove("slm/%d", i); - devfs_remove("slm"); if (unregister_chrdev( ACSI_MAJOR, "slm" ) != 0) printk( KERN_ERR "acsi_slm: cleanup_module failed\n"); atari_stram_free( SLMBuffer );