Lines Matching refs:hpdev
105 if (data->hpdev.nr < 0) in mlxreg_hotplug_device_create()
109 data->hpdev.adapter = i2c_get_adapter(data->hpdev.nr + in mlxreg_hotplug_device_create()
111 if (!data->hpdev.adapter) { in mlxreg_hotplug_device_create()
113 data->hpdev.nr + pdata->shift_nr); in mlxreg_hotplug_device_create()
117 client = i2c_new_client_device(data->hpdev.adapter, in mlxreg_hotplug_device_create()
118 data->hpdev.brdinfo); in mlxreg_hotplug_device_create()
121 data->hpdev.brdinfo->type, data->hpdev.nr + in mlxreg_hotplug_device_create()
122 pdata->shift_nr, data->hpdev.brdinfo->addr); in mlxreg_hotplug_device_create()
124 i2c_put_adapter(data->hpdev.adapter); in mlxreg_hotplug_device_create()
125 data->hpdev.adapter = NULL; in mlxreg_hotplug_device_create()
129 data->hpdev.client = client; in mlxreg_hotplug_device_create()
141 if (data->hpdev.client) { in mlxreg_hotplug_device_destroy()
142 i2c_unregister_device(data->hpdev.client); in mlxreg_hotplug_device_destroy()
143 data->hpdev.client = NULL; in mlxreg_hotplug_device_destroy()
146 if (data->hpdev.adapter) { in mlxreg_hotplug_device_destroy()
147 i2c_put_adapter(data->hpdev.adapter); in mlxreg_hotplug_device_destroy()
148 data->hpdev.adapter = NULL; in mlxreg_hotplug_device_destroy()