]> rtime.felk.cvut.cz Git - lincan.git/commitdiff
Hotplug device support functions renamed
authorBc. Jan Kriz <devel@jojen.net>
Tue, 22 Mar 2011 09:21:57 +0000 (10:21 +0100)
committerBc. Jan Kriz <devel@jojen.net>
Tue, 22 Mar 2011 09:21:57 +0000 (10:21 +0100)
lincan/include/main.h
lincan/src/main.c
lincan/src/usbcan.c

index 30713f6b219c23d5475fed80735d75a136832dd3..152af5c5b2166dd338dc7d21d36a969f9ec45fb8 100644 (file)
@@ -538,5 +538,5 @@ void can_filltimestamp(canmsg_tstamp_t *ptimestamp)
 extern int can_rtl_priority;
 #endif /*CAN_WITH_RTL*/
 
 extern int can_rtl_priority;
 #endif /*CAN_WITH_RTL*/
 
-extern struct candevice_t* register_usbdev(const char *hwname,void *devdata,void (*chipdataregfnc)(struct canchip_t *chip,void *data));
-extern void cleanup_usbdev(struct candevice_t *dev);
+extern struct candevice_t* register_hotplug_dev(const char *hwname,void *devdata,void (*chipdataregfnc)(struct canchip_t *chip,void *data));
+extern void cleanup_hotplug_dev(struct candevice_t *dev);
index 197f37f2a7a5e558af105c6f73053167cce7f96c..c36489569bca38efd0caa6fd5ddd097c6ec3fdf7 100644 (file)
@@ -442,7 +442,7 @@ int init_module(void)
 
 
 
 
 
 
-struct candevice_t* register_usbdev(const char *hwname,void *devdata,void (*chipdataregfnc)(struct canchip_t *ch,void *data)){
+struct candevice_t* register_hotplug_dev(const char *hwname,void *devdata,void (*chipdataregfnc)(struct canchip_t *ch,void *data)){
        int i=0, j, board=0;
        struct candevice_t *candev;
        struct canchip_t *chip;
        int i=0, j, board=0;
        struct candevice_t *candev;
        struct canchip_t *chip;
@@ -590,13 +590,7 @@ struct candevice_t* register_usbdev(const char *hwname,void *devdata,void (*chip
                return NULL;
 }
 
                return NULL;
 }
 
-
-
-
-
-
-
-void cleanup_usbdev(struct candevice_t *dev)
+void cleanup_hotplug_dev(struct candevice_t *dev)
 {
        int i=0;
        int dev_minor;
 {
        int i=0;
        int dev_minor;
index 429167c68d8a33d6aa796108ae02dad02e49b226..4492f616d1e030c3ee238ba7c1391416a2ab9f85 100644 (file)
@@ -1459,7 +1459,7 @@ static int usbcan_probe(struct usb_interface *interface, const struct usb_device
        /* save our data pointer in this interface device */
        usb_set_intfdata(interface, usbdevs);
 
        /* save our data pointer in this interface device */
        usb_set_intfdata(interface, usbdevs);
 
-       if (!(usbdevs->candev=register_usbdev("usbcan",(void *) usbdevs, usbcan_register_devs)))
+       if (!(usbdevs->candev=register_hotplug_dev("usbcan",(void *) usbdevs, usbcan_register_devs)))
                goto register_error;
 
        /* let the user know what node this device is now attached to */
                goto register_error;
 
        /* let the user know what node this device is now attached to */
@@ -1467,7 +1467,7 @@ static int usbcan_probe(struct usb_interface *interface, const struct usb_device
        return 0;
 
 register_error:
        return 0;
 
 register_error:
-       cleanup_usbdev(usbdevs->candev);
+       cleanup_hotplug_dev(usbdevs->candev);
 error:
        if (usbdevs){
                if (usbdevs->devs){
 error:
        if (usbdevs){
                if (usbdevs->devs){
@@ -1507,7 +1507,7 @@ static void usbcan_disconnect(struct usb_interface *interface)
        if (usbdevs->devs){
                usb_put_dev((*usbdevs->devs)->udev);
        }
        if (usbdevs->devs){
                usb_put_dev((*usbdevs->devs)->udev);
        }
-       cleanup_usbdev(usbdevs->candev);
+       cleanup_hotplug_dev(usbdevs->candev);
        if (usbdevs->devs){
                for (j=0;j<usbdevs->count;j++){
                        if (!usbdevs->devs[j])  continue;
        if (usbdevs->devs){
                for (j=0;j<usbdevs->count;j++){
                        if (!usbdevs->devs[j])  continue;