* device_create_file() and device_remove_file()
@ 2016-09-14 17:46 Matias Mucciolo
0 siblings, 0 replies; only message in thread
From: Matias Mucciolo @ 2016-09-14 17:46 UTC (permalink / raw)
To: kernelnewbies
Hi
im looking at the driver:
drivers/staging/olpc_dcon/olpc_dcon.c
(trying to clean up __ATTR with DEVICE_ATTR_RO/_RW)
line 663 creates sysfs files(in a for) :
......
rc = device_create_file(&dcon_device->dev, &dcon_device_files[i]);
if (rc) {
dev_err(&dcon_device->dev, "Cannot create sysfs file\n");
goto ecreate;
}
...
if it fails, then in the goto removes the created ones
with device_remove_file() and exits
the question i have is:
if don't fails and the files are created ...
in that code i don't see any other device_remove_file() call
to remove the files when, for example, the module unload.
i thinking its because when its load and used by the device they can't
be unload ?? so they don't need to clean up those files ?
or i missing something ?
Thanks
--
Matias Mucciolo
Area de Infraestructura.
Piedras 737 C.A.B.A
SUTEBA
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-14 17:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 17:46 device_create_file() and device_remove_file() Matias Mucciolo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.