[PATCH v2 2/2] kernel-device: use device sysfs if physdev sysfs isn't available

Aleksander Morgado aleksander at aleksander.es
Thu Mar 2 23:32:18 UTC 2017


On Thu, Mar 2, 2017 at 7:31 PM, Ben Chan <benchan at chromium.org> wrote:
> I saw a few self->priv->device check in mm-kernel-device-udev.c, so I was
> wondering if there are cases where self->priv->device may be NULL. I'd keep
> the check here for now as I haven't ruled out that possibility.

I think the device will be NULL for user-reported events, e.g. via
ReportKernelEvent() in that case we would have 'properties' set and
'device' set to NULL. In the case you're supporting, we do check for
properties being set before, so it may really be not necessary to
check whether device is set or not.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list