Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 113562 | Differences between
and this patch

Collapse All | Expand All

(-)OZSCR_2.0.3_Kern_2.6/src/ozscrlx-2.6.13/ozscrlx.c (-9 / +23 lines)
Lines 173-179 static irqreturn_t ozscr_interrupt(int i Link Here
173
 * device driver with appropriate cards, through the card configuration
173
 * device driver with appropriate cards, through the card configuration
174
 * database.
174
 * database.
175
 */
175
 */
176
static dev_info_t dev_info = "ozscrlx_cs";
176
//static dev_info_t dev_info = "ozscrlx_cs";
177
177
178
/*
178
/*
179
 * A linked list of "instances" of the OZSCR device.  Each actual
179
 * A linked list of "instances" of the OZSCR device.  Each actual
Lines 182-187 static dev_info_t dev_info = "ozscrlx_cs Link Here
182
 */
182
 */
183
static struct pcmcia_device *dev_list = NULL;
183
static struct pcmcia_device *dev_list = NULL;
184
184
185
/* new card-reader class */
186
static struct class *o2cr_class;
187
185
/*
188
/*
186
 * Private data for OZSCR reader. Need to provide a dev_node_t
189
 * Private data for OZSCR reader. Need to provide a dev_node_t
187
 * structure for the device.
190
 * structure for the device.
Lines 255-261 static int ozscr_open(struct inode *inod Link Here
255
    #undef FUNC_NAME
258
    #undef FUNC_NAME
256
    #define FUNC_NAME   "ozscr_open: "
259
    #define FUNC_NAME   "ozscr_open: "
257
260
258
    int                minor = iminor(inode);
261
//    int                minor = iminor(inode);
259
    struct pcmcia_device         *p_dev;
262
    struct pcmcia_device         *p_dev;
260
263
261
#ifdef PCMCIA_DEBUG
264
#ifdef PCMCIA_DEBUG
Lines 292-300 static int ozscr_close(struct inode *ino Link Here
292
295
293
#define FUNC_NAME   "ozscr_close: "
296
#define FUNC_NAME   "ozscr_close: "
294
297
295
    int                minor = iminor(inode);
298
//    int                minor = iminor(inode);
296
       struct pcmcia_device         *p_dev;
299
       struct pcmcia_device         *p_dev;
297
       struct ozscr_dev_t *dev;
300
//       struct ozscr_dev_t *dev;
298
301
299
#ifdef PCMCIA_DEBUG
302
#ifdef PCMCIA_DEBUG
300
    printk(KERN_INFO MODULE_NAME FUNC_NAME "minor(%d)\n", minor);
303
    printk(KERN_INFO MODULE_NAME FUNC_NAME "minor(%d)\n", minor);
Lines 331-343 static int ozscr_close(struct inode *ino Link Here
331
 *	copy information back to the user fill the reader status bit and
334
 *	copy information back to the user fill the reader status bit and
332
 *	succeed, even if the reader had an error.
335
 *	succeed, even if the reader had an error.
333
 */
336
 */
334
static int
337
static int ozscr_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg)
335
ozscr_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg)
336
{
338
{
337
#undef FUNC_NAME
339
#undef FUNC_NAME
338
#define FUNC_NAME	"ozscr_ioctl: "
340
#define FUNC_NAME	"ozscr_ioctl: "
339
341
340
    int                minor = iminor(inode);
342
//    int                minor = iminor(inode);
341
    struct pcmcia_device *p_dev;
343
    struct pcmcia_device *p_dev;
342
    struct ozscr_dev_t *dev;
344
    struct ozscr_dev_t *dev;
343
    int                ret = 0;                /* return value */
345
    int                ret = 0;                /* return value */
Lines 859-864 static int ozscr_attach(struct pcmcia_de Link Here
859
861
860
//    link->next = dev_list; /* build linked to handle multiple instances */
862
//    link->next = dev_list; /* build linked to handle multiple instances */
861
   //XXX
863
   //XXX
864
862
   dev_list = p_dev;
865
   dev_list = p_dev;
863
866
864
       ret = ozscr_config(p_dev);
867
       ret = ozscr_config(p_dev);
Lines 875-880 static int ozscr_attach(struct pcmcia_de Link Here
875
    printk(KERN_INFO MODULE_NAME FUNC_NAME "function complete\n"); 
878
    printk(KERN_INFO MODULE_NAME FUNC_NAME "function complete\n"); 
876
#endif 
879
#endif 
877
       // XXX free pRdrExt ?
880
       // XXX free pRdrExt ?
881
882
       // XXX not sure if p_dev->device_no is ok?
883
       class_device_create(o2cr_class, NULL, MKDEV(OZSCR_MAJOR, p_dev->device_no), NULL, "o2cr%d", p_dev->device_no);
884
878
       return 0;
885
       return 0;
879
886
880
ErrHandle:
887
ErrHandle:
Lines 973-982 static struct file_operations ozscr_chr_ Link Here
973
/* ========================================================================= 
980
/* ========================================================================= 
974
   Entry/Ending point of the driver
981
   Entry/Ending point of the driver
975
*/
982
*/
976
static int
983
static int init_ozscrlx(void)
977
init_ozscrlx(void)
978
{
984
{
979
985
986
       o2cr_class = class_create(THIS_MODULE, "o2cr");
987
       if (!o2cr_class)
988
               return -1;
989
990
980
#undef FUNC_NAME
991
#undef FUNC_NAME
981
#define FUNC_NAME   "init_ozscrlx: "
992
#define FUNC_NAME   "init_ozscrlx: "
982
993
Lines 999-1004 init_ozscrlx(void) Link Here
999
    printk(KERN_INFO MODULE_NAME FUNC_NAME "function complete!\n");
1010
    printk(KERN_INFO MODULE_NAME FUNC_NAME "function complete!\n");
1000
#endif
1011
#endif
1001
1012
1013
1002
    return 0;
1014
    return 0;
1003
1015
1004
}
1016
}
Lines 1019-1024 static void exit_ozscrlx(void) Link Here
1019
	ozscr_detach(dev_list);
1031
	ozscr_detach(dev_list);
1020
    }
1032
    }
1021
1033
1034
	class_destroy(o2cr_class);
1035
1022
    return;
1036
    return;
1023
}
1037
}
1024
1038

Return to bug 113562