From 832e99d94a22c8d887f86e6451b6a0f0358e7bf5 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Mon, 21 Apr 2008 22:23:30 +0000 Subject: [PATCH] --- yaml --- r: 91746 b: refs/heads/master c: 58da495065134b45799bd02988ab658c3da6af25 h: refs/heads/master v: v3 --- [refs] | 2 +- .../firmware_class/firmware_sample_driver.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 759bee456a0a..498431edf1dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6f69a6d776f6f5921d73ad9648e43d9b59afeff4 +refs/heads/master: 58da495065134b45799bd02988ab658c3da6af25 diff --git a/trunk/Documentation/firmware_class/firmware_sample_driver.c b/trunk/Documentation/firmware_class/firmware_sample_driver.c index 6865cbe075ec..600cdd9ea7db 100644 --- a/trunk/Documentation/firmware_class/firmware_sample_driver.c +++ b/trunk/Documentation/firmware_class/firmware_sample_driver.c @@ -34,8 +34,7 @@ static void sample_probe_default(void) const struct firmware *fw_entry; printk(KERN_INFO "firmware_sample_driver: a ghost device got inserted :)\n"); - if(request_firmware(&fw_entry, "sample_driver_fw", &ghost_device)!=0) - { + if (request_firmware(&fw_entry, "sample_driver_fw", &ghost_device)!=0) { printk(KERN_ERR "firmware_sample_driver: Firmware not available\n"); return; @@ -56,8 +55,7 @@ static void sample_probe_specific(void) printk(KERN_INFO "firmware_sample_driver: a ghost device got inserted :)\n"); - if(request_firmware(NULL, "sample_driver_fw", &ghost_device)!=0) - { + if (request_firmware(NULL, "sample_driver_fw", &ghost_device)!=0) { printk(KERN_ERR "firmware_sample_driver: Firmware load failed\n"); return; @@ -70,7 +68,7 @@ static void sample_probe_specific(void) } static void sample_probe_async_cont(const struct firmware *fw, void *context) { - if(!fw){ + if (!fw) { printk(KERN_ERR "firmware_sample_driver: firmware load failed\n"); return; @@ -88,9 +86,8 @@ static void sample_probe_async(void) "sample_driver_fw", &ghost_device, "my device pointer", sample_probe_async_cont); - if(error){ - printk(KERN_ERR - "firmware_sample_driver:" + if (error) { + printk(KERN_ERR "firmware_sample_driver:" " request_firmware_nowait failed\n"); } } @@ -105,6 +102,7 @@ static int sample_init(void) sample_probe_async(); return 0; } + static void __exit sample_exit(void) { }