Lines Matching refs:atp_rfk
1190 struct tpacpi_rfk *atp_rfk; in tpacpi_new_rfkill() local
1198 atp_rfk = kzalloc(sizeof(struct tpacpi_rfk), GFP_KERNEL); in tpacpi_new_rfkill()
1199 if (atp_rfk) in tpacpi_new_rfkill()
1200 atp_rfk->rfkill = rfkill_alloc(name, in tpacpi_new_rfkill()
1204 atp_rfk); in tpacpi_new_rfkill()
1205 if (!atp_rfk || !atp_rfk->rfkill) { in tpacpi_new_rfkill()
1207 kfree(atp_rfk); in tpacpi_new_rfkill()
1211 atp_rfk->id = id; in tpacpi_new_rfkill()
1212 atp_rfk->ops = tp_rfkops; in tpacpi_new_rfkill()
1223 rfkill_init_sw_state(atp_rfk->rfkill, sw_state); in tpacpi_new_rfkill()
1227 rfkill_set_hw_state(atp_rfk->rfkill, hw_state); in tpacpi_new_rfkill()
1229 res = rfkill_register(atp_rfk->rfkill); in tpacpi_new_rfkill()
1232 rfkill_destroy(atp_rfk->rfkill); in tpacpi_new_rfkill()
1233 kfree(atp_rfk); in tpacpi_new_rfkill()
1237 tpacpi_rfkill_switches[id] = atp_rfk; in tpacpi_new_rfkill()