diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-02 14:43:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-02 14:43:33 -0400 |
commit | fe3c22bd5cadd8e36977b218b27fbea821381ec8 (patch) | |
tree | cc4d4479a077c0db22e5de40d181ad6963fc3993 /drivers/misc/sram.c | |
parent | ce49b6289fa3878b190f15192e54bb23dca552b6 (diff) | |
parent | 380672698b8e64f0b5e418412b1ed370bd366428 (diff) |
Merge tag 'char-misc-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc updates from Greg KH:
"Here's the big char/misc driver tree merge for 3.11-rc1
A variety of different driver patches here. All of these have been in
linux-next for a while, and the networking patches were acked-by David
Miller, as it made sense for those patches to come through this tree"
* tag 'char-misc-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (102 commits)
Revert "char: misc: assign file->private_data in all cases"
drivers: uio_pdrv_genirq: Use of_match_ptr() macro
mei: check whether hw start has succeeded
mei: check if the hardware reset succeeded
mei: mei_cl_connect: don't multiply the timeout twice
mei: do not override a client writing state when buffering
mei: move mei_cl_irq_write_complete to client.c
UIO: Fix concurrency issue
drivers: uio_dmem_genirq: Use of_match_ptr() macro
char: misc: assign file->private_data in all cases
drivers: hv: allocate synic structures before hv_synic_init()
drivers: hv: check interrupt mask before read_index
vme: vme_tsi148.c: fix error return code in tsi148_probe()
FMC: fix error handling in probe() function
fmc: avoid readl/writel namespace conflict
FMC: NULL dereference on allocation failure
UIO: fix uio_pdrv_genirq with device tree but no interrupt
UIO: allow binding uio_pdrv_genirq.c to devices using command line option
FMC: add a char-device mezzanine driver
FMC: add a driver to write mezzanine EEPROM
...
Diffstat (limited to 'drivers/misc/sram.c')
-rw-r--r-- | drivers/misc/sram.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 437192e43006..d87cc91bc016 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c | |||
@@ -45,15 +45,12 @@ static int sram_probe(struct platform_device *pdev) | |||
45 | int ret; | 45 | int ret; |
46 | 46 | ||
47 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 47 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
48 | if (!res) | 48 | virt_base = devm_ioremap_resource(&pdev->dev, res); |
49 | return -EINVAL; | 49 | if (IS_ERR(virt_base)) |
50 | return PTR_ERR(virt_base); | ||
50 | 51 | ||
51 | size = resource_size(res); | 52 | size = resource_size(res); |
52 | 53 | ||
53 | virt_base = devm_request_and_ioremap(&pdev->dev, res); | ||
54 | if (!virt_base) | ||
55 | return -EADDRNOTAVAIL; | ||
56 | |||
57 | sram = devm_kzalloc(&pdev->dev, sizeof(*sram), GFP_KERNEL); | 54 | sram = devm_kzalloc(&pdev->dev, sizeof(*sram), GFP_KERNEL); |
58 | if (!sram) | 55 | if (!sram) |
59 | return -ENOMEM; | 56 | return -ENOMEM; |