Lines Matching refs:sw_dev
44 struct lan9303_i2c *sw_dev; in lan9303_i2c_probe() local
47 sw_dev = devm_kzalloc(&client->dev, sizeof(struct lan9303_i2c), in lan9303_i2c_probe()
49 if (!sw_dev) in lan9303_i2c_probe()
52 sw_dev->chip.regmap = devm_regmap_init_i2c(client, in lan9303_i2c_probe()
54 if (IS_ERR(sw_dev->chip.regmap)) { in lan9303_i2c_probe()
55 ret = PTR_ERR(sw_dev->chip.regmap); in lan9303_i2c_probe()
62 sw_dev->device = client; in lan9303_i2c_probe()
63 i2c_set_clientdata(client, sw_dev); in lan9303_i2c_probe()
64 sw_dev->chip.dev = &client->dev; in lan9303_i2c_probe()
66 sw_dev->chip.ops = &lan9303_indirect_phy_ops; in lan9303_i2c_probe()
68 ret = lan9303_probe(&sw_dev->chip, client->dev.of_node); in lan9303_i2c_probe()
79 struct lan9303_i2c *sw_dev; in lan9303_i2c_remove() local
81 sw_dev = i2c_get_clientdata(client); in lan9303_i2c_remove()
82 if (!sw_dev) in lan9303_i2c_remove()
85 return lan9303_remove(&sw_dev->chip); in lan9303_i2c_remove()