Skip to content
Commit 1ab83238 authored by Robert Lukassen's avatar Robert Lukassen Committed by Greg Kroah-Hartman
Browse files

USB: gadget: Allow function access to device ID data during bind()



This is a patch that makes sure that the device ID data (idVendor,
idProduct and bcdDevice) are assigned to the descriptor in the cdev
structure *before* the composite gadget starts binding. This allows the
composite driver, and all the composite functions it uses, access to
that data.

In one of the composite functions we created, we needed to register an
input device and wanted to use the idVendor, idProduct and bcdDevice
codes to properly initialize the id field of the input device. We could
not do that because the idVendor, idProduct and bcdDevice values were
only set in the cdec structure *after* the composite->bind(cdev) call.

Signed-off-by: default avatarRobert Lukassen <robert.lukassen@tomtom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1d6ec813
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment