]> Pileus Git - ~andy/linux/blobdiff - drivers/rapidio/switches/tsi568.c
Merge remote branch 'kumar/next' into merge
[~andy/linux] / drivers / rapidio / switches / tsi568.c
index b9a389b9f812f823bb752492b1de9fa63aa5d468..3994c00aa01ff7161ad19193110e1a493e91d5f2 100644 (file)
@@ -113,22 +113,17 @@ tsi568_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount,
 static int
 tsi568_em_init(struct rio_dev *rdev)
 {
-       struct rio_mport *mport = rdev->net->hport;
-       u16 destid = rdev->rswitch->destid;
-       u8 hopcount = rdev->rswitch->hopcount;
        u32 regval;
        int portnum;
 
-       pr_debug("TSI568 %s [%d:%d]\n", __func__, destid, hopcount);
+       pr_debug("TSI568 %s [%d:%d]\n", __func__, rdev->destid, rdev->hopcount);
 
        /* Make sure that Port-Writes are disabled (for all ports) */
        for (portnum = 0;
             portnum < RIO_GET_TOTAL_PORTS(rdev->swpinfo); portnum++) {
-               rio_mport_read_config_32(mport, destid, hopcount,
-                               TSI568_SP_MODE(portnum), &regval);
-               rio_mport_write_config_32(mport, destid, hopcount,
-                               TSI568_SP_MODE(portnum),
-                               regval | TSI568_SP_MODE_PW_DIS);
+               rio_read_config_32(rdev, TSI568_SP_MODE(portnum), &regval);
+               rio_write_config_32(rdev, TSI568_SP_MODE(portnum),
+                                   regval | TSI568_SP_MODE_PW_DIS);
        }
 
        return 0;