* linux-next: manual merge of the devicetree tree with the spi-current tree
@ 2011-02-16 4:09 Stephen Rothwell
2011-02-16 4:41 ` Grant Likely
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2011-02-16 4:09 UTC (permalink / raw)
To: Grant Likely; +Cc: linux-next, linux-kernel, Sebastian Andrzej Siewior
Hi Grant,
Today's linux-next merge of the devicetree tree got a conflict in
drivers/spi/pxa2xx_spi_pci.c between commit
0f3e1d27a7e3f98d996d707d649128e229b65deb ("spi/pxa2xx pci: fix the
release - remove race") from the spi-current tree and commit
c9e358dfc4a8cb2227172ef77908c2e0ee17bcb9 ("driver-core: remove
conditionals around devicetree pointers") from the devicetree tree.
I fixed it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/spi/pxa2xx_spi_pci.c
index 19752b0,b6589bb..0000000
--- a/drivers/spi/pxa2xx_spi_pci.c
+++ b/drivers/spi/pxa2xx_spi_pci.c
@@@ -75,24 -84,25 +75,22 @@@ static int __devinit ce4100_spi_probe(s
return ret;
}
+ pdev = platform_device_alloc("pxa2xx-spi", dev->devfn);
spi_info = kzalloc(sizeof(*spi_info), GFP_KERNEL);
- if (!spi_info) {
+ if (!pdev || !spi_info ) {
ret = -ENOMEM;
- goto err_kz;
+ goto err_nomem;
}
- ssp = &spi_info->ssp;
- pdev = &spi_info->spi_pdev;
- spi_pdata = &spi_info->spi_pdata;
+ memset(&spi_pdata, 0, sizeof(spi_pdata));
+ spi_pdata.num_chipselect = dev->devfn;
- pdev->name = "pxa2xx-spi";
- pdev->id = dev->devfn;
- pdev->dev.parent = &dev->dev;
- pdev->dev.platform_data = &spi_info->spi_pdata;
+ ret = platform_device_add_data(pdev, &spi_pdata, sizeof(spi_pdata));
+ if (ret)
+ goto err_nomem;
+ pdev->dev.parent = &dev->dev;
- #ifdef CONFIG_OF
pdev->dev.of_node = dev->dev.of_node;
- #endif
- pdev->dev.release = plat_dev_release;
-
- spi_pdata->num_chipselect = dev->devfn;
-
+ ssp = &spi_info->ssp;
ssp->phys_base = pci_resource_start(dev, 0);
ssp->mmio_base = ioremap(phys_beg, phys_len);
if (!ssp->mmio_base) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: manual merge of the devicetree tree with the spi-current tree
2011-02-16 4:09 linux-next: manual merge of the devicetree tree with the spi-current tree Stephen Rothwell
@ 2011-02-16 4:41 ` Grant Likely
2011-02-16 20:48 ` Grant Likely
0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2011-02-16 4:41 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Sebastian Andrzej Siewior
On Tue, Feb 15, 2011 at 9:09 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Grant,
>
> Today's linux-next merge of the devicetree tree got a conflict in
> drivers/spi/pxa2xx_spi_pci.c between commit
> 0f3e1d27a7e3f98d996d707d649128e229b65deb ("spi/pxa2xx pci: fix the
> release - remove race") from the spi-current tree and commit
> c9e358dfc4a8cb2227172ef77908c2e0ee17bcb9 ("driver-core: remove
> conditionals around devicetree pointers") from the devicetree tree.
>
> I fixed it up (see below) and can carry the fix as necessary.
Heh, seeing as those are *both* my trees, I'll take care of merging
appropriately to sort this out. :-)
g.
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
>
> diff --cc drivers/spi/pxa2xx_spi_pci.c
> index 19752b0,b6589bb..0000000
> --- a/drivers/spi/pxa2xx_spi_pci.c
> +++ b/drivers/spi/pxa2xx_spi_pci.c
> @@@ -75,24 -84,25 +75,22 @@@ static int __devinit ce4100_spi_probe(s
> return ret;
> }
>
> + pdev = platform_device_alloc("pxa2xx-spi", dev->devfn);
> spi_info = kzalloc(sizeof(*spi_info), GFP_KERNEL);
> - if (!spi_info) {
> + if (!pdev || !spi_info ) {
> ret = -ENOMEM;
> - goto err_kz;
> + goto err_nomem;
> }
> - ssp = &spi_info->ssp;
> - pdev = &spi_info->spi_pdev;
> - spi_pdata = &spi_info->spi_pdata;
> + memset(&spi_pdata, 0, sizeof(spi_pdata));
> + spi_pdata.num_chipselect = dev->devfn;
>
> - pdev->name = "pxa2xx-spi";
> - pdev->id = dev->devfn;
> - pdev->dev.parent = &dev->dev;
> - pdev->dev.platform_data = &spi_info->spi_pdata;
> + ret = platform_device_add_data(pdev, &spi_pdata, sizeof(spi_pdata));
> + if (ret)
> + goto err_nomem;
>
> + pdev->dev.parent = &dev->dev;
> - #ifdef CONFIG_OF
> pdev->dev.of_node = dev->dev.of_node;
> - #endif
> - pdev->dev.release = plat_dev_release;
> -
> - spi_pdata->num_chipselect = dev->devfn;
> -
> + ssp = &spi_info->ssp;
> ssp->phys_base = pci_resource_start(dev, 0);
> ssp->mmio_base = ioremap(phys_beg, phys_len);
> if (!ssp->mmio_base) {
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: manual merge of the devicetree tree with the spi-current tree
2011-02-16 4:41 ` Grant Likely
@ 2011-02-16 20:48 ` Grant Likely
0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2011-02-16 20:48 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Sebastian Andrzej Siewior
On Tue, Feb 15, 2011 at 9:41 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Tue, Feb 15, 2011 at 9:09 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> Hi Grant,
>>
>> Today's linux-next merge of the devicetree tree got a conflict in
>> drivers/spi/pxa2xx_spi_pci.c between commit
>> 0f3e1d27a7e3f98d996d707d649128e229b65deb ("spi/pxa2xx pci: fix the
>> release - remove race") from the spi-current tree and commit
>> c9e358dfc4a8cb2227172ef77908c2e0ee17bcb9 ("driver-core: remove
>> conditionals around devicetree pointers") from the devicetree tree.
>>
>> I fixed it up (see below) and can carry the fix as necessary.
>
> Heh, seeing as those are *both* my trees, I'll take care of merging
> appropriately to sort this out. :-)
I've just asked Linus to pull the spi-current branch. When 2.6.38-rc6
is released I'll merge it into the devicetree branch which will take
care of the merge conflict.
g.
>
> g.
>
>> --
>> Cheers,
>> Stephen Rothwell sfr@canb.auug.org.au
>>
>> diff --cc drivers/spi/pxa2xx_spi_pci.c
>> index 19752b0,b6589bb..0000000
>> --- a/drivers/spi/pxa2xx_spi_pci.c
>> +++ b/drivers/spi/pxa2xx_spi_pci.c
>> @@@ -75,24 -84,25 +75,22 @@@ static int __devinit ce4100_spi_probe(s
>> return ret;
>> }
>>
>> + pdev = platform_device_alloc("pxa2xx-spi", dev->devfn);
>> spi_info = kzalloc(sizeof(*spi_info), GFP_KERNEL);
>> - if (!spi_info) {
>> + if (!pdev || !spi_info ) {
>> ret = -ENOMEM;
>> - goto err_kz;
>> + goto err_nomem;
>> }
>> - ssp = &spi_info->ssp;
>> - pdev = &spi_info->spi_pdev;
>> - spi_pdata = &spi_info->spi_pdata;
>> + memset(&spi_pdata, 0, sizeof(spi_pdata));
>> + spi_pdata.num_chipselect = dev->devfn;
>>
>> - pdev->name = "pxa2xx-spi";
>> - pdev->id = dev->devfn;
>> - pdev->dev.parent = &dev->dev;
>> - pdev->dev.platform_data = &spi_info->spi_pdata;
>> + ret = platform_device_add_data(pdev, &spi_pdata, sizeof(spi_pdata));
>> + if (ret)
>> + goto err_nomem;
>>
>> + pdev->dev.parent = &dev->dev;
>> - #ifdef CONFIG_OF
>> pdev->dev.of_node = dev->dev.of_node;
>> - #endif
>> - pdev->dev.release = plat_dev_release;
>> -
>> - spi_pdata->num_chipselect = dev->devfn;
>> -
>> + ssp = &spi_info->ssp;
>> ssp->phys_base = pci_resource_start(dev, 0);
>> ssp->mmio_base = ioremap(phys_beg, phys_len);
>> if (!ssp->mmio_base) {
>>
>
>
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-16 20:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-16 4:09 linux-next: manual merge of the devicetree tree with the spi-current tree Stephen Rothwell
2011-02-16 4:41 ` Grant Likely
2011-02-16 20:48 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).