Skip to contentSkip to conversation

rfkill causes oops with NULL parent device

DISCUSSION Jonathan McDowell 1 participant 1 message Oct 22, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I'm trying to add support for the bluetooth device on Toshiba laptops using rfkill. The device is controlled only via software and doesn't exist at all unless enabled, at which point it appears on the USB bus.

However, doing something along the lines of:

toshiba_bluetooth_rfkill = rfkill_allocate(NULL, RFKILL_TYPE_BLUETOOTH);

if (toshiba_bluetooth_rfkill != NULL) {
	result = rfkill_register(toshiba_bluetooth_rfkill);
}

causes an oops; the laptop I'm testing on doesn't have serial so it's hard to capture the backtrace, but it's the call to device_add in rfkill_register and there's mention of get_device_parent.

This is with 2.6.23. If rfkill *requires* a parent device then I would have thought it should return an error if passed NULL in _allocate?

J.

Signature · 4 lines
] http://www.earth.li/~noodles/ [] I am Elmer of Borg, be vewy quiet,  [
]  PGP/GPG Key @ the.earth.li   []      I'm assimilating wabbits.      [
] via keyserver, web or email.  []                                     [
] RSA: 4DC4E7FD / DSA: 5B430367 []                                     [