Re: [PATCH v4 14/23] drm/tilcdc: Provide ddc symlink in connector sysfs directory

From: Andrzej Pietrasiewicz
Date: Wed Jul 24 2019 - 04:51:12 EST


Hi Thomas,

W dniu 24.07.2019 oÂ10:01, Thomas Zimmermann pisze:
Hi




I think this echoes my concern about the implicit order of operation. It
seems too easy to get this wrong. If you don't want to add an additional
interface for setting the ddc field, why not add a dedicated initializer
function that sets the ddc field? Something like this.

int drm_connector_init_with_ddc(connector, funcs, ..., ddc)
{
ret = drm_connector_init(connector, funcs, ...);
if (ret)
return ret;

if (!ddc)
return 0;

connector->ddc = ddc;
/* set up sysfs */

return 0;
}


True. I will send a v5 soon.

Thanks,

Andrzej