Changeset 45059d6b in mainline for uspace/srv/devman/devman.c
- Timestamp:
- 2011-08-19T16:31:47Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 107f2e0, 16f9782, 1c99eae
- Parents:
- 0fe52ef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
r0fe52ef r45059d6b 548 548 549 549 fibril_mutex_lock(&driver->driver_mutex); 550 551 async_exch_t *exch = async_exchange_begin(driver->sess);552 async_sess_t *sess = async_connect_me_to(EXCHANGE_SERIALIZE, exch,553 DRIVER_DEVMAN, 0, 0);554 async_exchange_end(exch);555 556 if (!sess) {557 fibril_mutex_unlock(&driver->driver_mutex);558 return;559 }560 550 561 551 /* … … 583 573 fibril_mutex_unlock(&driver->driver_mutex); 584 574 585 add_device( sess,driver, dev, tree);575 add_device(driver, dev, tree); 586 576 587 577 /* … … 603 593 link = driver->devices.head.next; 604 594 } 605 606 async_hangup(sess);607 595 608 596 /* … … 718 706 * @param node The device's node in the device tree. 719 707 */ 720 void add_device(async_sess_t *sess, driver_t *drv, dev_node_t *dev, 721 dev_tree_t *tree) 708 void add_device(driver_t *drv, dev_node_t *dev, dev_tree_t *tree) 722 709 { 723 710 /* … … 736 723 } 737 724 738 async_exch_t *exch = async_exchange_begin( sess);725 async_exch_t *exch = async_exchange_begin(drv->sess); 739 726 740 727 ipc_call_t answer; … … 806 793 fibril_mutex_unlock(&drv->driver_mutex); 807 794 808 if (is_running) { 809 /* Notify the driver about the new device. */ 810 async_exch_t *exch = async_exchange_begin(drv->sess); 811 async_sess_t *sess = async_connect_me_to(EXCHANGE_SERIALIZE, exch, 812 DRIVER_DEVMAN, 0, 0); 813 async_exchange_end(exch); 814 815 if (sess) { 816 add_device(sess, drv, dev, tree); 817 async_hangup(sess); 818 } 819 } 795 /* Notify the driver about the new device. */ 796 if (is_running) 797 add_device(drv, dev, tree); 820 798 821 799 return true;
Note:
See TracChangeset
for help on using the changeset viewer.