Lines Matching refs:sw_dev
35 struct lan9303_i2c *sw_dev; in lan9303_i2c_probe() local
38 sw_dev = devm_kzalloc(&client->dev, sizeof(struct lan9303_i2c), in lan9303_i2c_probe()
40 if (!sw_dev) in lan9303_i2c_probe()
43 sw_dev->chip.regmap = devm_regmap_init_i2c(client, in lan9303_i2c_probe()
45 if (IS_ERR(sw_dev->chip.regmap)) { in lan9303_i2c_probe()
46 ret = PTR_ERR(sw_dev->chip.regmap); in lan9303_i2c_probe()
53 sw_dev->device = client; in lan9303_i2c_probe()
54 i2c_set_clientdata(client, sw_dev); in lan9303_i2c_probe()
55 sw_dev->chip.dev = &client->dev; in lan9303_i2c_probe()
57 sw_dev->chip.ops = &lan9303_indirect_phy_ops; in lan9303_i2c_probe()
59 ret = lan9303_probe(&sw_dev->chip, client->dev.of_node); in lan9303_i2c_probe()
70 struct lan9303_i2c *sw_dev; in lan9303_i2c_remove() local
72 sw_dev = i2c_get_clientdata(client); in lan9303_i2c_remove()
73 if (!sw_dev) in lan9303_i2c_remove()
76 return lan9303_remove(&sw_dev->chip); in lan9303_i2c_remove()