Lines Matching refs:atp_rfk
1268 struct tpacpi_rfk *atp_rfk; in tpacpi_new_rfkill() local
1276 atp_rfk = kzalloc(sizeof(struct tpacpi_rfk), GFP_KERNEL); in tpacpi_new_rfkill()
1277 if (atp_rfk) in tpacpi_new_rfkill()
1278 atp_rfk->rfkill = rfkill_alloc(name, in tpacpi_new_rfkill()
1282 atp_rfk); in tpacpi_new_rfkill()
1283 if (!atp_rfk || !atp_rfk->rfkill) { in tpacpi_new_rfkill()
1285 kfree(atp_rfk); in tpacpi_new_rfkill()
1289 atp_rfk->id = id; in tpacpi_new_rfkill()
1290 atp_rfk->ops = tp_rfkops; in tpacpi_new_rfkill()
1301 rfkill_init_sw_state(atp_rfk->rfkill, sw_state); in tpacpi_new_rfkill()
1305 rfkill_set_hw_state(atp_rfk->rfkill, hw_state); in tpacpi_new_rfkill()
1307 res = rfkill_register(atp_rfk->rfkill); in tpacpi_new_rfkill()
1310 rfkill_destroy(atp_rfk->rfkill); in tpacpi_new_rfkill()
1311 kfree(atp_rfk); in tpacpi_new_rfkill()
1315 tpacpi_rfkill_switches[id] = atp_rfk; in tpacpi_new_rfkill()