Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next

This merges from linux-arm at 860660fd829e ("ARM: 9055/1: mailbox:
arm_mhuv2: make remove callback return void") into char-misc-next to get
the amba fixes from Uwe.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+159 -202
+123 -115
drivers/amba/bus.c
··· 56 56 return NULL; 57 57 } 58 58 59 - static int amba_match(struct device *dev, struct device_driver *drv) 59 + static int amba_get_enable_pclk(struct amba_device *pcdev) 60 60 { 61 - struct amba_device *pcdev = to_amba_device(dev); 62 - struct amba_driver *pcdrv = to_amba_driver(drv); 61 + int ret; 63 62 64 - /* When driver_override is set, only bind to the matching driver */ 65 - if (pcdev->driver_override) 66 - return !strcmp(pcdev->driver_override, drv->name); 63 + pcdev->pclk = clk_get(&pcdev->dev, "apb_pclk"); 64 + if (IS_ERR(pcdev->pclk)) 65 + return PTR_ERR(pcdev->pclk); 67 66 68 - return amba_lookup(pcdrv->id_table, pcdev) != NULL; 67 + ret = clk_prepare_enable(pcdev->pclk); 68 + if (ret) 69 + clk_put(pcdev->pclk); 70 + 71 + return ret; 69 72 } 70 73 71 - static int amba_uevent(struct device *dev, struct kobj_uevent_env *env) 74 + static void amba_put_disable_pclk(struct amba_device *pcdev) 72 75 { 73 - struct amba_device *pcdev = to_amba_device(dev); 74 - int retval = 0; 75 - 76 - retval = add_uevent_var(env, "AMBA_ID=%08x", pcdev->periphid); 77 - if (retval) 78 - return retval; 79 - 80 - retval = add_uevent_var(env, "MODALIAS=amba:d%08X", pcdev->periphid); 81 - return retval; 76 + clk_disable_unprepare(pcdev->pclk); 77 + clk_put(pcdev->pclk); 82 78 } 79 + 83 80 84 81 static ssize_t driver_override_show(struct device *_dev, 85 82 struct device_attribute *attr, char *buf) ··· 149 152 }; 150 153 ATTRIBUTE_GROUPS(amba_dev); 151 154 155 + static int amba_match(struct device *dev, struct device_driver *drv) 156 + { 157 + struct amba_device *pcdev = to_amba_device(dev); 158 + struct amba_driver *pcdrv = to_amba_driver(drv); 159 + 160 + /* When driver_override is set, only bind to the matching driver */ 161 + if (pcdev->driver_override) 162 + return !strcmp(pcdev->driver_override, drv->name); 163 + 164 + return amba_lookup(pcdrv->id_table, pcdev) != NULL; 165 + } 166 + 167 + static int amba_uevent(struct device *dev, struct kobj_uevent_env *env) 168 + { 169 + struct amba_device *pcdev = to_amba_device(dev); 170 + int retval = 0; 171 + 172 + retval = add_uevent_var(env, "AMBA_ID=%08x", pcdev->periphid); 173 + if (retval) 174 + return retval; 175 + 176 + retval = add_uevent_var(env, "MODALIAS=amba:d%08X", pcdev->periphid); 177 + return retval; 178 + } 179 + 180 + /* 181 + * These are the device model conversion veneers; they convert the 182 + * device model structures to our more specific structures. 183 + */ 184 + static int amba_probe(struct device *dev) 185 + { 186 + struct amba_device *pcdev = to_amba_device(dev); 187 + struct amba_driver *pcdrv = to_amba_driver(dev->driver); 188 + const struct amba_id *id = amba_lookup(pcdrv->id_table, pcdev); 189 + int ret; 190 + 191 + do { 192 + ret = of_clk_set_defaults(dev->of_node, false); 193 + if (ret < 0) 194 + break; 195 + 196 + ret = dev_pm_domain_attach(dev, true); 197 + if (ret) 198 + break; 199 + 200 + ret = amba_get_enable_pclk(pcdev); 201 + if (ret) { 202 + dev_pm_domain_detach(dev, true); 203 + break; 204 + } 205 + 206 + pm_runtime_get_noresume(dev); 207 + pm_runtime_set_active(dev); 208 + pm_runtime_enable(dev); 209 + 210 + ret = pcdrv->probe(pcdev, id); 211 + if (ret == 0) 212 + break; 213 + 214 + pm_runtime_disable(dev); 215 + pm_runtime_set_suspended(dev); 216 + pm_runtime_put_noidle(dev); 217 + 218 + amba_put_disable_pclk(pcdev); 219 + dev_pm_domain_detach(dev, true); 220 + } while (0); 221 + 222 + return ret; 223 + } 224 + 225 + static int amba_remove(struct device *dev) 226 + { 227 + struct amba_device *pcdev = to_amba_device(dev); 228 + struct amba_driver *drv = to_amba_driver(dev->driver); 229 + 230 + pm_runtime_get_sync(dev); 231 + if (drv->remove) 232 + drv->remove(pcdev); 233 + pm_runtime_put_noidle(dev); 234 + 235 + /* Undo the runtime PM settings in amba_probe() */ 236 + pm_runtime_disable(dev); 237 + pm_runtime_set_suspended(dev); 238 + pm_runtime_put_noidle(dev); 239 + 240 + amba_put_disable_pclk(pcdev); 241 + dev_pm_domain_detach(dev, true); 242 + 243 + return 0; 244 + } 245 + 246 + static void amba_shutdown(struct device *dev) 247 + { 248 + struct amba_driver *drv; 249 + 250 + if (!dev->driver) 251 + return; 252 + 253 + drv = to_amba_driver(dev->driver); 254 + if (drv->shutdown) 255 + drv->shutdown(to_amba_device(dev)); 256 + } 257 + 152 258 #ifdef CONFIG_PM 153 259 /* 154 260 * Hooks to provide runtime PM of the pclk (bus clock). It is safe to ··· 317 217 .dev_groups = amba_dev_groups, 318 218 .match = amba_match, 319 219 .uevent = amba_uevent, 220 + .probe = amba_probe, 221 + .remove = amba_remove, 222 + .shutdown = amba_shutdown, 320 223 .dma_configure = platform_dma_configure, 321 224 .pm = &amba_pm, 322 225 }; ··· 332 229 333 230 postcore_initcall(amba_init); 334 231 335 - static int amba_get_enable_pclk(struct amba_device *pcdev) 336 - { 337 - int ret; 338 - 339 - pcdev->pclk = clk_get(&pcdev->dev, "apb_pclk"); 340 - if (IS_ERR(pcdev->pclk)) 341 - return PTR_ERR(pcdev->pclk); 342 - 343 - ret = clk_prepare_enable(pcdev->pclk); 344 - if (ret) 345 - clk_put(pcdev->pclk); 346 - 347 - return ret; 348 - } 349 - 350 - static void amba_put_disable_pclk(struct amba_device *pcdev) 351 - { 352 - clk_disable_unprepare(pcdev->pclk); 353 - clk_put(pcdev->pclk); 354 - } 355 - 356 - /* 357 - * These are the device model conversion veneers; they convert the 358 - * device model structures to our more specific structures. 359 - */ 360 - static int amba_probe(struct device *dev) 361 - { 362 - struct amba_device *pcdev = to_amba_device(dev); 363 - struct amba_driver *pcdrv = to_amba_driver(dev->driver); 364 - const struct amba_id *id = amba_lookup(pcdrv->id_table, pcdev); 365 - int ret; 366 - 367 - do { 368 - ret = of_clk_set_defaults(dev->of_node, false); 369 - if (ret < 0) 370 - break; 371 - 372 - ret = dev_pm_domain_attach(dev, true); 373 - if (ret) 374 - break; 375 - 376 - ret = amba_get_enable_pclk(pcdev); 377 - if (ret) { 378 - dev_pm_domain_detach(dev, true); 379 - break; 380 - } 381 - 382 - pm_runtime_get_noresume(dev); 383 - pm_runtime_set_active(dev); 384 - pm_runtime_enable(dev); 385 - 386 - ret = pcdrv->probe(pcdev, id); 387 - if (ret == 0) 388 - break; 389 - 390 - pm_runtime_disable(dev); 391 - pm_runtime_set_suspended(dev); 392 - pm_runtime_put_noidle(dev); 393 - 394 - amba_put_disable_pclk(pcdev); 395 - dev_pm_domain_detach(dev, true); 396 - } while (0); 397 - 398 - return ret; 399 - } 400 - 401 - static int amba_remove(struct device *dev) 402 - { 403 - struct amba_device *pcdev = to_amba_device(dev); 404 - struct amba_driver *drv = to_amba_driver(dev->driver); 405 - int ret; 406 - 407 - pm_runtime_get_sync(dev); 408 - ret = drv->remove(pcdev); 409 - pm_runtime_put_noidle(dev); 410 - 411 - /* Undo the runtime PM settings in amba_probe() */ 412 - pm_runtime_disable(dev); 413 - pm_runtime_set_suspended(dev); 414 - pm_runtime_put_noidle(dev); 415 - 416 - amba_put_disable_pclk(pcdev); 417 - dev_pm_domain_detach(dev, true); 418 - 419 - return ret; 420 - } 421 - 422 - static void amba_shutdown(struct device *dev) 423 - { 424 - struct amba_driver *drv = to_amba_driver(dev->driver); 425 - drv->shutdown(to_amba_device(dev)); 426 - } 427 - 428 232 /** 429 233 * amba_driver_register - register an AMBA device driver 430 234 * @drv: amba device driver structure ··· 342 332 */ 343 333 int amba_driver_register(struct amba_driver *drv) 344 334 { 345 - drv->drv.bus = &amba_bustype; 335 + if (!drv->probe) 336 + return -EINVAL; 346 337 347 - #define SETFN(fn) if (drv->fn) drv->drv.fn = amba_##fn 348 - SETFN(probe); 349 - SETFN(remove); 350 - SETFN(shutdown); 338 + drv->drv.bus = &amba_bustype; 351 339 352 340 return driver_register(&drv->drv); 353 341 }
+1 -2
drivers/char/hw_random/nomadik-rng.c
··· 69 69 return ret; 70 70 } 71 71 72 - static int nmk_rng_remove(struct amba_device *dev) 72 + static void nmk_rng_remove(struct amba_device *dev) 73 73 { 74 74 amba_release_regions(dev); 75 75 clk_disable(rng_clk); 76 - return 0; 77 76 } 78 77 79 78 static const struct amba_id nmk_rng_ids[] = {
+1 -2
drivers/dma/pl330.c
··· 3195 3195 return ret; 3196 3196 } 3197 3197 3198 - static int pl330_remove(struct amba_device *adev) 3198 + static void pl330_remove(struct amba_device *adev) 3199 3199 { 3200 3200 struct pl330_dmac *pl330 = amba_get_drvdata(adev); 3201 3201 struct dma_pl330_chan *pch, *_p; ··· 3235 3235 3236 3236 if (pl330->rstc) 3237 3237 reset_control_assert(pl330->rstc); 3238 - return 0; 3239 3238 } 3240 3239 3241 3240 static const struct amba_id pl330_ids[] = {
+1 -3
drivers/gpu/drm/pl111/pl111_drv.c
··· 320 320 return ret; 321 321 } 322 322 323 - static int pl111_amba_remove(struct amba_device *amba_dev) 323 + static void pl111_amba_remove(struct amba_device *amba_dev) 324 324 { 325 325 struct device *dev = &amba_dev->dev; 326 326 struct drm_device *drm = amba_get_drvdata(amba_dev); ··· 331 331 drm_panel_bridge_remove(priv->bridge); 332 332 drm_dev_put(drm); 333 333 of_reserved_mem_device_release(dev); 334 - 335 - return 0; 336 334 } 337 335 338 336 /*
+1 -2
drivers/hwtracing/coresight/coresight-catu.c
··· 571 571 return ret; 572 572 } 573 573 574 - static int catu_remove(struct amba_device *adev) 574 + static void catu_remove(struct amba_device *adev) 575 575 { 576 576 struct catu_drvdata *drvdata = dev_get_drvdata(&adev->dev); 577 577 578 578 coresight_unregister(drvdata->csdev); 579 - return 0; 580 579 } 581 580 582 581 static struct amba_id catu_ids[] = {
+1 -3
drivers/hwtracing/coresight/coresight-cpu-debug.c
··· 627 627 return ret; 628 628 } 629 629 630 - static int debug_remove(struct amba_device *adev) 630 + static void debug_remove(struct amba_device *adev) 631 631 { 632 632 struct device *dev = &adev->dev; 633 633 struct debug_drvdata *drvdata = amba_get_drvdata(adev); ··· 642 642 643 643 if (!--debug_count) 644 644 debug_func_exit(); 645 - 646 - return 0; 647 645 } 648 646 649 647 static const struct amba_cs_uci_id uci_id_debug[] = {
+1 -3
drivers/hwtracing/coresight/coresight-cti-core.c
··· 839 839 if (drvdata->csdev_release) 840 840 drvdata->csdev_release(dev); 841 841 } 842 - static int cti_remove(struct amba_device *adev) 842 + static void cti_remove(struct amba_device *adev) 843 843 { 844 844 struct cti_drvdata *drvdata = dev_get_drvdata(&adev->dev); 845 845 ··· 848 848 mutex_unlock(&ect_mutex); 849 849 850 850 coresight_unregister(drvdata->csdev); 851 - 852 - return 0; 853 851 } 854 852 855 853 static int cti_probe(struct amba_device *adev, const struct amba_id *id)
+1 -3
drivers/hwtracing/coresight/coresight-etb10.c
··· 805 805 return ret; 806 806 } 807 807 808 - static int etb_remove(struct amba_device *adev) 808 + static void etb_remove(struct amba_device *adev) 809 809 { 810 810 struct etb_drvdata *drvdata = dev_get_drvdata(&adev->dev); 811 811 ··· 816 816 */ 817 817 misc_deregister(&drvdata->miscdev); 818 818 coresight_unregister(drvdata->csdev); 819 - 820 - return 0; 821 819 } 822 820 823 821 #ifdef CONFIG_PM
+1 -3
drivers/hwtracing/coresight/coresight-etm3x-core.c
··· 912 912 etmdrvdata[cpu] = NULL; 913 913 } 914 914 915 - static int etm_remove(struct amba_device *adev) 915 + static void etm_remove(struct amba_device *adev) 916 916 { 917 917 struct etm_drvdata *drvdata = dev_get_drvdata(&adev->dev); 918 918 ··· 935 935 cpus_read_unlock(); 936 936 937 937 coresight_unregister(drvdata->csdev); 938 - 939 - return 0; 940 938 } 941 939 942 940 #ifdef CONFIG_PM
-2
drivers/hwtracing/coresight/coresight-etm4x-core.c
··· 1906 1906 cpus_read_unlock(); 1907 1907 1908 1908 coresight_unregister(drvdata->csdev); 1909 - 1910 - return 0; 1911 1909 } 1912 1910 1913 1911 static int __exit etm4_remove_amba(struct amba_device *adev)
+2 -2
drivers/hwtracing/coresight/coresight-funnel.c
··· 373 373 return funnel_probe(&adev->dev, &adev->res); 374 374 } 375 375 376 - static int dynamic_funnel_remove(struct amba_device *adev) 376 + static void dynamic_funnel_remove(struct amba_device *adev) 377 377 { 378 - return funnel_remove(&adev->dev); 378 + funnel_remove(&adev->dev); 379 379 } 380 380 381 381 static const struct amba_id dynamic_funnel_ids[] = {
+2 -2
drivers/hwtracing/coresight/coresight-replicator.c
··· 393 393 return replicator_probe(&adev->dev, &adev->res); 394 394 } 395 395 396 - static int dynamic_replicator_remove(struct amba_device *adev) 396 + static void dynamic_replicator_remove(struct amba_device *adev) 397 397 { 398 - return replicator_remove(&adev->dev); 398 + replicator_remove(&adev->dev); 399 399 } 400 400 401 401 static const struct amba_id dynamic_replicator_ids[] = {
+1 -3
drivers/hwtracing/coresight/coresight-stm.c
··· 953 953 return ret; 954 954 } 955 955 956 - static int stm_remove(struct amba_device *adev) 956 + static void stm_remove(struct amba_device *adev) 957 957 { 958 958 struct stm_drvdata *drvdata = dev_get_drvdata(&adev->dev); 959 959 960 960 coresight_unregister(drvdata->csdev); 961 961 962 962 stm_unregister_device(&drvdata->stm); 963 - 964 - return 0; 965 963 } 966 964 967 965 #ifdef CONFIG_PM
+1 -3
drivers/hwtracing/coresight/coresight-tmc-core.c
··· 563 563 spin_unlock_irqrestore(&drvdata->spinlock, flags); 564 564 } 565 565 566 - static int tmc_remove(struct amba_device *adev) 566 + static void tmc_remove(struct amba_device *adev) 567 567 { 568 568 struct tmc_drvdata *drvdata = dev_get_drvdata(&adev->dev); 569 569 ··· 574 574 */ 575 575 misc_deregister(&drvdata->miscdev); 576 576 coresight_unregister(drvdata->csdev); 577 - 578 - return 0; 579 577 } 580 578 581 579 static const struct amba_id tmc_ids[] = {
+1 -3
drivers/hwtracing/coresight/coresight-tpiu.c
··· 170 170 return PTR_ERR(drvdata->csdev); 171 171 } 172 172 173 - static int tpiu_remove(struct amba_device *adev) 173 + static void tpiu_remove(struct amba_device *adev) 174 174 { 175 175 struct tpiu_drvdata *drvdata = dev_get_drvdata(&adev->dev); 176 176 177 177 coresight_unregister(drvdata->csdev); 178 - 179 - return 0; 180 178 } 181 179 182 180 #ifdef CONFIG_PM
+1 -3
drivers/i2c/busses/i2c-nomadik.c
··· 1055 1055 return ret; 1056 1056 } 1057 1057 1058 - static int nmk_i2c_remove(struct amba_device *adev) 1058 + static void nmk_i2c_remove(struct amba_device *adev) 1059 1059 { 1060 1060 struct resource *res = &adev->res; 1061 1061 struct nmk_i2c_dev *dev = amba_get_drvdata(adev); ··· 1068 1068 i2c_clr_bit(dev->virtbase + I2C_CR, I2C_CR_PE); 1069 1069 clk_disable_unprepare(dev->clk); 1070 1070 release_mem_region(res->start, resource_size(res)); 1071 - 1072 - return 0; 1073 1071 } 1074 1072 1075 1073 static struct i2c_vendor_data vendor_stn8815 = {
+1 -2
drivers/input/serio/ambakmi.c
··· 159 159 return ret; 160 160 } 161 161 162 - static int amba_kmi_remove(struct amba_device *dev) 162 + static void amba_kmi_remove(struct amba_device *dev) 163 163 { 164 164 struct amba_kmi_port *kmi = amba_get_drvdata(dev); 165 165 ··· 168 168 iounmap(kmi->base); 169 169 kfree(kmi); 170 170 amba_release_regions(dev); 171 - return 0; 172 171 } 173 172 174 173 static int __maybe_unused amba_kmi_resume(struct device *dev)
+1 -3
drivers/mailbox/arm_mhuv2.c
··· 1095 1095 return ret; 1096 1096 } 1097 1097 1098 - static int mhuv2_remove(struct amba_device *adev) 1098 + static void mhuv2_remove(struct amba_device *adev) 1099 1099 { 1100 1100 struct mhuv2 *mhu = amba_get_drvdata(adev); 1101 1101 1102 1102 if (mhu->frame == SENDER_FRAME) 1103 1103 writel_relaxed(0x0, &mhu->send->access_request); 1104 - 1105 - return 0; 1106 1104 } 1107 1105 1108 1106 static struct amba_id mhuv2_ids[] = {
+1 -3
drivers/memory/pl172.c
··· 273 273 return ret; 274 274 } 275 275 276 - static int pl172_remove(struct amba_device *adev) 276 + static void pl172_remove(struct amba_device *adev) 277 277 { 278 278 struct pl172_data *pl172 = amba_get_drvdata(adev); 279 279 280 280 clk_disable_unprepare(pl172->clk); 281 281 amba_release_regions(adev); 282 - 283 - return 0; 284 282 } 285 283 286 284 static const struct amba_id pl172_ids[] = {
+1 -3
drivers/memory/pl353-smc.c
··· 426 426 return err; 427 427 } 428 428 429 - static int pl353_smc_remove(struct amba_device *adev) 429 + static void pl353_smc_remove(struct amba_device *adev) 430 430 { 431 431 struct pl353_smc_data *pl353_smc = amba_get_drvdata(adev); 432 432 433 433 clk_disable_unprepare(pl353_smc->memclk); 434 434 clk_disable_unprepare(pl353_smc->aclk); 435 - 436 - return 0; 437 435 } 438 436 439 437 static const struct amba_id pl353_ids[] = {
+1 -3
drivers/mmc/host/mmci.c
··· 2195 2195 return ret; 2196 2196 } 2197 2197 2198 - static int mmci_remove(struct amba_device *dev) 2198 + static void mmci_remove(struct amba_device *dev) 2199 2199 { 2200 2200 struct mmc_host *mmc = amba_get_drvdata(dev); 2201 2201 ··· 2223 2223 clk_disable_unprepare(host->clk); 2224 2224 mmc_free_host(mmc); 2225 2225 } 2226 - 2227 - return 0; 2228 2226 } 2229 2227 2230 2228 #ifdef CONFIG_PM
+1 -3
drivers/rtc/rtc-pl030.c
··· 137 137 return ret; 138 138 } 139 139 140 - static int pl030_remove(struct amba_device *dev) 140 + static void pl030_remove(struct amba_device *dev) 141 141 { 142 142 struct pl030_rtc *rtc = amba_get_drvdata(dev); 143 143 ··· 146 146 free_irq(dev->irq[0], rtc); 147 147 iounmap(rtc->base); 148 148 amba_release_regions(dev); 149 - 150 - return 0; 151 149 } 152 150 153 151 static struct amba_id pl030_ids[] = {
+1 -3
drivers/rtc/rtc-pl031.c
··· 280 280 return 0; 281 281 } 282 282 283 - static int pl031_remove(struct amba_device *adev) 283 + static void pl031_remove(struct amba_device *adev) 284 284 { 285 285 struct pl031_local *ldata = dev_get_drvdata(&adev->dev); 286 286 ··· 289 289 if (adev->irq[0]) 290 290 free_irq(adev->irq[0], ldata); 291 291 amba_release_regions(adev); 292 - 293 - return 0; 294 292 } 295 293 296 294 static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
+2 -3
drivers/spi/spi-pl022.c
··· 2314 2314 return status; 2315 2315 } 2316 2316 2317 - static int 2317 + static void 2318 2318 pl022_remove(struct amba_device *adev) 2319 2319 { 2320 2320 struct pl022 *pl022 = amba_get_drvdata(adev); 2321 2321 2322 2322 if (!pl022) 2323 - return 0; 2323 + return; 2324 2324 2325 2325 /* 2326 2326 * undo pm_runtime_put() in probe. I assume that we're not ··· 2335 2335 clk_disable_unprepare(pl022->clk); 2336 2336 amba_release_regions(adev); 2337 2337 tasklet_disable(&pl022->pump_transfers); 2338 - return 0; 2339 2338 } 2340 2339 2341 2340 #ifdef CONFIG_PM_SLEEP
+1 -3
drivers/tty/serial/amba-pl010.c
··· 754 754 return ret; 755 755 } 756 756 757 - static int pl010_remove(struct amba_device *dev) 757 + static void pl010_remove(struct amba_device *dev) 758 758 { 759 759 struct uart_amba_port *uap = amba_get_drvdata(dev); 760 760 int i; ··· 770 770 771 771 if (!busy) 772 772 uart_unregister_driver(&amba_reg); 773 - 774 - return 0; 775 773 } 776 774 777 775 #ifdef CONFIG_PM_SLEEP
+1 -2
drivers/tty/serial/amba-pl011.c
··· 2679 2679 return pl011_register_port(uap); 2680 2680 } 2681 2681 2682 - static int pl011_remove(struct amba_device *dev) 2682 + static void pl011_remove(struct amba_device *dev) 2683 2683 { 2684 2684 struct uart_amba_port *uap = amba_get_drvdata(dev); 2685 2685 2686 2686 uart_remove_one_port(&amba_reg, &uap->port); 2687 2687 pl011_unregister_port(uap); 2688 - return 0; 2689 2688 } 2690 2689 2691 2690 #ifdef CONFIG_PM_SLEEP
+5 -10
drivers/vfio/platform/vfio_amba.c
··· 71 71 return ret; 72 72 } 73 73 74 - static int vfio_amba_remove(struct amba_device *adev) 74 + static void vfio_amba_remove(struct amba_device *adev) 75 75 { 76 - struct vfio_platform_device *vdev; 76 + struct vfio_platform_device *vdev = 77 + vfio_platform_remove_common(&adev->dev); 77 78 78 - vdev = vfio_platform_remove_common(&adev->dev); 79 - if (vdev) { 80 - kfree(vdev->name); 81 - kfree(vdev); 82 - return 0; 83 - } 84 - 85 - return -EINVAL; 79 + kfree(vdev->name); 80 + kfree(vdev); 86 81 } 87 82 88 83 static const struct amba_id pl330_ids[] = {
+1 -3
drivers/video/fbdev/amba-clcd.c
··· 925 925 return ret; 926 926 } 927 927 928 - static int clcdfb_remove(struct amba_device *dev) 928 + static void clcdfb_remove(struct amba_device *dev) 929 929 { 930 930 struct clcd_fb *fb = amba_get_drvdata(dev); 931 931 ··· 942 942 kfree(fb); 943 943 944 944 amba_release_regions(dev); 945 - 946 - return 0; 947 945 } 948 946 949 947 static const struct amba_id clcdfb_id_table[] = {
+1 -3
drivers/watchdog/sp805_wdt.c
··· 305 305 return ret; 306 306 } 307 307 308 - static int sp805_wdt_remove(struct amba_device *adev) 308 + static void sp805_wdt_remove(struct amba_device *adev) 309 309 { 310 310 struct sp805_wdt *wdt = amba_get_drvdata(adev); 311 311 312 312 watchdog_unregister_device(&wdt->wdd); 313 313 watchdog_set_drvdata(&wdt->wdd, NULL); 314 - 315 - return 0; 316 314 } 317 315 318 316 static int __maybe_unused sp805_wdt_suspend(struct device *dev)
+1 -1
include/linux/amba/bus.h
··· 76 76 struct amba_driver { 77 77 struct device_driver drv; 78 78 int (*probe)(struct amba_device *, const struct amba_id *); 79 - int (*remove)(struct amba_device *); 79 + void (*remove)(struct amba_device *); 80 80 void (*shutdown)(struct amba_device *); 81 81 const struct amba_id *id_table; 82 82 };
+1 -3
sound/arm/aaci.c
··· 1055 1055 return ret; 1056 1056 } 1057 1057 1058 - static int aaci_remove(struct amba_device *dev) 1058 + static void aaci_remove(struct amba_device *dev) 1059 1059 { 1060 1060 struct snd_card *card = amba_get_drvdata(dev); 1061 1061 ··· 1066 1066 snd_card_free(card); 1067 1067 amba_release_regions(dev); 1068 1068 } 1069 - 1070 - return 0; 1071 1069 } 1072 1070 1073 1071 static struct amba_id aaci_ids[] = {