summaryrefslogtreecommitdiffstats
path: root/drivers/char/virtio_console.c
diff options
context:
space:
mode:
authorTom Van Braeckel <tomvanbraeckel@gmail.com>2015-03-31 16:39:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-03 16:15:30 +0200
commit0b509d8d336eef6d622d66b3ae2a1fc3a072bf92 (patch)
tree581850695df4a3fb3ee009513ee5afed7317593c /drivers/char/virtio_console.c
parent16c9c8e1ae228e89b66cbc03ec6c753ee44d39bc (diff)
downloadblackbird-op-linux-0b509d8d336eef6d622d66b3ae2a1fc3a072bf92.tar.gz
blackbird-op-linux-0b509d8d336eef6d622d66b3ae2a1fc3a072bf92.zip
misc: pass miscdevice through file's private_data
Make the miscdevice accessible through the file's private_data. Previously, this was done only when an open() file operation had been registered. If no custom open() file operation was defined, private_data was set to NULL. This subtle quirk was confusing, to the point where kernel code registered *empty* file open operations to have private_data point to the misc device structure and avoid duplicating that logic. And it could easily lead to bugs, where the addition or removal of a custom open() file operation surprisingly changes the initial value of a file's private_data structure. To resolve this, we now place the miscdevice in the file's private_data member unconditionally when open() is called. Signed-off-by: Tom Van Braeckel <tomvanbraeckel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/virtio_console.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud