summaryrefslogtreecommitdiff
path: root/crypto/dh_helper.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <brgl@bgdev.pl>2017-11-27 11:48:40 +0100
committerLinus Walleij <linus.walleij@linaro.org>2017-12-02 22:42:24 +0100
commit8a39f597bcfde78d566fb61b39215d8897f0f392 (patch)
treebfa4ca299fdb1d2d79e7c585743f79649c069fc3 /crypto/dh_helper.c
parentb447a75100a63c114a8aaa02563088f4995c09f3 (diff)
gpio: mockup: rework device probing
We currently create a single platform device in init and then parse the configuration passed to us via module parameters in probe() before creating GPIO chips and registering them with the gpiolib framework. The relation between platform devices and mockup chips should be 1:1. Create a separate platform device for each mockup chip using convenient helpers (platform_device_register_resndata()). Pass a platform data structure to probe() in which the configuration (GPIO base, number of lines, chip index) extracted from the module params is stored. Make probe() create a single mockup chip for every platform device. This approach has several advantages: - we only parse the module parameters in init() and can bail out before attaching any device if the input is invalid (currently we would have to examine kernel logs), - we'll get notified by the device framework about errors in probe() for specific chips, - probe() gets simplified and only does what it's supposed to. Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'crypto/dh_helper.c')
0 files changed, 0 insertions, 0 deletions