From: ppisa Date: Fri, 1 Jul 2005 17:25:04 +0000 (+0000) Subject: Added missing chip attach and release to the virtual chip driver. X-Git-Tag: CLT_COMM_CAN-lincan-0_3_1~3 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/commitdiff_plain/c1f8d2586d9c8219ed3a92004b207d0ee81689f4?ds=sidebyside Added missing chip attach and release to the virtual chip driver. --- diff --git a/lincan/src/virtual.c b/lincan/src/virtual.c index 3b300a9..f1ae39e 100644 --- a/lincan/src/virtual.c +++ b/lincan/src/virtual.c @@ -189,6 +189,30 @@ int virtual_stop_chip(struct canchip_t *chip) return 0; } +/** + * virtual_attach_to_chip: - attaches to the chip, setups registers and state + * @chip: pointer to chip state structure + * + * Return Value: negative value reports error. + * File: src/virtual.c + */ +int virtual_attach_to_chip(struct canchip_t *chip) +{ + return 0; +} + +/** + * virtual_release_chip: - called before chip structure removal if %CHIP_ATTACHED is set + * @chip: pointer to chip state structure + * + * Return Value: negative value reports error. + * File: src/virtual.c + */ +int virtual_release_chip(struct canchip_t *chip) +{ + virtual_stop_chip(chip); + return 0; +} /** * virtual_remote_request: - configures message object and asks for RTR message @@ -473,6 +497,8 @@ int virtual_init_chip_data(struct candevice_t *candev, int chipnr) chip->chipspecops->remote_request=virtual_remote_request; chip->chipspecops->enable_configuration=virtual_enable_configuration; chip->chipspecops->disable_configuration=virtual_disable_configuration; + chip->chipspecops->attach_to_chip=virtual_attach_to_chip; + chip->chipspecops->release_chip=virtual_release_chip; chip->chipspecops->set_btregs=virtual_set_btregs; chip->chipspecops->start_chip=virtual_start_chip; chip->chipspecops->stop_chip=virtual_stop_chip;