mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-08 02:38:14 +00:00
The purpose of gigaset_device_release() is to kfree() the struct ser_cardstate that contains our struct device. This is done via a bit of a detour. First we make our struct device's driver_data point to the container of our struct ser_cardstate (which is a struct cardstate). In gigaset_device_release() we then retrieve that driver_data again. And after that we finally kfree() the struct ser_cardstate that was saved in the struct cardstate. All of this can be achieved much easier by using container_of() to get from our struct device to its container, struct ser_cardstate. Do so. Note that at the time the detour was implemented commit |
||
|---|---|---|
| .. | ||
| asyncdata.c | ||
| bas-gigaset.c | ||
| capi.c | ||
| common.c | ||
| dummyll.c | ||
| ev-layer.c | ||
| gigaset.h | ||
| i4l.c | ||
| interface.c | ||
| isocdata.c | ||
| Kconfig | ||
| Makefile | ||
| proc.c | ||
| ser-gigaset.c | ||
| usb-gigaset.c | ||