Lines Matching refs:rdev
115 tsi568_em_init(struct rio_dev *rdev) in tsi568_em_init() argument
120 pr_debug("TSI568 %s [%d:%d]\n", __func__, rdev->destid, rdev->hopcount); in tsi568_em_init()
124 portnum < RIO_GET_TOTAL_PORTS(rdev->swpinfo); portnum++) { in tsi568_em_init()
125 rio_read_config_32(rdev, TSI568_SP_MODE(portnum), ®val); in tsi568_em_init()
126 rio_write_config_32(rdev, TSI568_SP_MODE(portnum), in tsi568_em_init()
144 static int tsi568_probe(struct rio_dev *rdev, const struct rio_device_id *id) in tsi568_probe() argument
146 pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev)); in tsi568_probe()
148 spin_lock(&rdev->rswitch->lock); in tsi568_probe()
150 if (rdev->rswitch->ops) { in tsi568_probe()
151 spin_unlock(&rdev->rswitch->lock); in tsi568_probe()
155 rdev->rswitch->ops = &tsi568_switch_ops; in tsi568_probe()
156 spin_unlock(&rdev->rswitch->lock); in tsi568_probe()
160 static void tsi568_remove(struct rio_dev *rdev) in tsi568_remove() argument
162 pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev)); in tsi568_remove()
163 spin_lock(&rdev->rswitch->lock); in tsi568_remove()
164 if (rdev->rswitch->ops != &tsi568_switch_ops) { in tsi568_remove()
165 spin_unlock(&rdev->rswitch->lock); in tsi568_remove()
168 rdev->rswitch->ops = NULL; in tsi568_remove()
169 spin_unlock(&rdev->rswitch->lock); in tsi568_remove()