/*****************************************************************************
* *
* File: mv88x201x.c *
- * $Revision: 1.7 $ *
- * $Date: 2005/03/23 07:15:59 $ *
+ * $Revision: 1.12 $ *
+ * $Date: 2005/04/15 19:27:14 $ *
* Description: *
* Marvell PHY (mv88x201x) functionality. *
* part of the Chelsio 10Gb Ethernet Driver. *
};
static struct cphy *mv88x201x_phy_create(adapter_t *adapter, int phy_addr,
- struct mdio_ops *mdio_ops)
+ const struct mdio_ops *mdio_ops)
{
u32 val;
- struct cphy *cphy = kmalloc(sizeof(*cphy), GFP_KERNEL);
+ struct cphy *cphy = kzalloc(sizeof(*cphy), GFP_KERNEL);
if (!cphy)
return NULL;
- memset(cphy, 0, sizeof(*cphy));
+
cphy_init(cphy, adapter, phy_addr, &mv88x201x_ops, mdio_ops);
/* Commands the PHY to enable XFP's clock. */
return 0;
}
-struct gphy t1_mv88x201x_ops = {
- mv88x201x_phy_create,
- mv88x201x_phy_reset
+const struct gphy t1_mv88x201x_ops = {
+ .create = mv88x201x_phy_create,
+ .reset = mv88x201x_phy_reset
};