* [PATCH -next] mtd/nand/r852: fix build for CONFIG_PM=n
[not found] <20100301210210.c6f465e6.sfr@canb.auug.org.au>
@ 2010-03-01 21:54 ` Randy Dunlap
2010-03-02 12:02 ` Maxim Levitsky
0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2010-03-01 21:54 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Maxim Levitsky, LKML, Rafael J. Wysocki, linux-next, linux-mtd,
David Woodhouse
From: Randy Dunlap <randy.dunlap@oracle.com>
Fix r852 build for the case of CONFIG_PM=n.
drivers/mtd/nand/r852.c:1039: error: implicit declaration of function 'pci_prepare_to_sleep'
drivers/mtd/nand/r852.c:1048: error: implicit declaration of function 'pci_back_from_sleep'
This patch leaves r852_pm_ops untouched.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: David Woodhouse <dwmw2@infradead.org>
---
drivers/mtd/nand/r852.c | 5 +++++
1 file changed, 5 insertions(+)
--- linux-next-20100301.orig/drivers/mtd/nand/r852.c
+++ linux-next-20100301/drivers/mtd/nand/r852.c
@@ -1007,6 +1007,7 @@ void r852_shutdown(struct pci_dev *pci_d
pci_disable_device(pci_dev);
}
+#ifdef CONFIG_PM
int r852_suspend(struct device *device)
{
struct r852_device *dev = pci_get_drvdata(to_pci_dev(device));
@@ -1081,6 +1082,10 @@ int r852_resume(struct device *device)
r852_update_card_detect(dev);
return 0;
}
+#else
+#define r852_suspend NULL
+#define r852_resume NULL
+#endif
static const struct pci_device_id r852_pci_id_tbl[] = {
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] mtd/nand/r852: fix build for CONFIG_PM=n
2010-03-01 21:54 ` [PATCH -next] mtd/nand/r852: fix build for CONFIG_PM=n Randy Dunlap
@ 2010-03-02 12:02 ` Maxim Levitsky
2010-03-11 16:29 ` Randy Dunlap
0 siblings, 1 reply; 6+ messages in thread
From: Maxim Levitsky @ 2010-03-02 12:02 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, LKML, Rafael J. Wysocki, linux-next, linux-mtd,
David Woodhouse
On Mon, 2010-03-01 at 13:54 -0800, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Fix r852 build for the case of CONFIG_PM=n.
>
> drivers/mtd/nand/r852.c:1039: error: implicit declaration of function 'pci_prepare_to_sleep'
> drivers/mtd/nand/r852.c:1048: error: implicit declaration of function 'pci_back_from_sleep'
>
> This patch leaves r852_pm_ops untouched.
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> Cc: Maxim Levitsky <maximlevitsky@gmail.com>
> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> Cc: David Woodhouse <dwmw2@infradead.org>
> ---
> drivers/mtd/nand/r852.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> --- linux-next-20100301.orig/drivers/mtd/nand/r852.c
> +++ linux-next-20100301/drivers/mtd/nand/r852.c
> @@ -1007,6 +1007,7 @@ void r852_shutdown(struct pci_dev *pci_d
> pci_disable_device(pci_dev);
> }
>
> +#ifdef CONFIG_PM
> int r852_suspend(struct device *device)
> {
> struct r852_device *dev = pci_get_drvdata(to_pci_dev(device));
> @@ -1081,6 +1082,10 @@ int r852_resume(struct device *device)
> r852_update_card_detect(dev);
> return 0;
> }
> +#else
> +#define r852_suspend NULL
> +#define r852_resume NULL
> +#endif
>
> static const struct pci_device_id r852_pci_id_tbl[] = {
>
>
oops, I forgot about that case again..
Acked-by: Maxim Levitsky <maximlevitsky@gmail.com>
Best regards,
Maxim Levitsky
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] mtd/nand/r852: fix build for CONFIG_PM=n
2010-03-02 12:02 ` Maxim Levitsky
@ 2010-03-11 16:29 ` Randy Dunlap
2010-03-11 16:34 ` Randy Dunlap
0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2010-03-11 16:29 UTC (permalink / raw)
To: Maxim Levitsky
Cc: Stephen Rothwell, LKML, Rafael J. Wysocki, linux-next, linux-mtd,
David Woodhouse
On 03/02/10 04:02, Maxim Levitsky wrote:
> On Mon, 2010-03-01 at 13:54 -0800, Randy Dunlap wrote:
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>
>> Fix r852 build for the case of CONFIG_PM=n.
>>
>> drivers/mtd/nand/r852.c:1039: error: implicit declaration of function 'pci_prepare_to_sleep'
>> drivers/mtd/nand/r852.c:1048: error: implicit declaration of function 'pci_back_from_sleep'
>>
>> This patch leaves r852_pm_ops untouched.
>>
>> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
>> Cc: Maxim Levitsky <maximlevitsky@gmail.com>
>> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
>> Cc: David Woodhouse <dwmw2@infradead.org>
>> ---
>> drivers/mtd/nand/r852.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> --- linux-next-20100301.orig/drivers/mtd/nand/r852.c
>> +++ linux-next-20100301/drivers/mtd/nand/r852.c
>> @@ -1007,6 +1007,7 @@ void r852_shutdown(struct pci_dev *pci_d
>> pci_disable_device(pci_dev);
>> }
>>
>> +#ifdef CONFIG_PM
>> int r852_suspend(struct device *device)
>> {
>> struct r852_device *dev = pci_get_drvdata(to_pci_dev(device));
>> @@ -1081,6 +1082,10 @@ int r852_resume(struct device *device)
>> r852_update_card_detect(dev);
>> return 0;
>> }
>> +#else
>> +#define r852_suspend NULL
>> +#define r852_resume NULL
>> +#endif
>>
>> static const struct pci_device_id r852_pci_id_tbl[] = {
>>
>>
> oops, I forgot about that case again..
> Acked-by: Maxim Levitsky <maximlevitsky@gmail.com>
Ping. can we get this added to linux-next, please?
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] mtd/nand/r852: fix build for CONFIG_PM=n
2010-03-11 16:29 ` Randy Dunlap
@ 2010-03-11 16:34 ` Randy Dunlap
2010-03-11 17:10 ` [PATCH -next] mtd/nand/r852: fix build for CONFIG_PCI disabled Randy Dunlap
0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2010-03-11 16:34 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, Maxim Levitsky, LKML, Rafael J. Wysocki,
linux-next, linux-mtd, David Woodhouse
On 03/11/10 08:29, Randy Dunlap wrote:
> On 03/02/10 04:02, Maxim Levitsky wrote:
>> On Mon, 2010-03-01 at 13:54 -0800, Randy Dunlap wrote:
>>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>>
>>> Fix r852 build for the case of CONFIG_PM=n.
>>>
>>> drivers/mtd/nand/r852.c:1039: error: implicit declaration of function 'pci_prepare_to_sleep'
>>> drivers/mtd/nand/r852.c:1048: error: implicit declaration of function 'pci_back_from_sleep'
>>>
>>> This patch leaves r852_pm_ops untouched.
>>>
>>> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
>>> Cc: Maxim Levitsky <maximlevitsky@gmail.com>
>>> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
>>> Cc: David Woodhouse <dwmw2@infradead.org>
>>> ---
>>> drivers/mtd/nand/r852.c | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> --- linux-next-20100301.orig/drivers/mtd/nand/r852.c
>>> +++ linux-next-20100301/drivers/mtd/nand/r852.c
>>> @@ -1007,6 +1007,7 @@ void r852_shutdown(struct pci_dev *pci_d
>>> pci_disable_device(pci_dev);
>>> }
>>>
>>> +#ifdef CONFIG_PM
>>> int r852_suspend(struct device *device)
>>> {
>>> struct r852_device *dev = pci_get_drvdata(to_pci_dev(device));
>>> @@ -1081,6 +1082,10 @@ int r852_resume(struct device *device)
>>> r852_update_card_detect(dev);
>>> return 0;
>>> }
>>> +#else
>>> +#define r852_suspend NULL
>>> +#define r852_resume NULL
>>> +#endif
>>>
>>> static const struct pci_device_id r852_pci_id_tbl[] = {
>>>
>>>
>> oops, I forgot about that case again..
>> Acked-by: Maxim Levitsky <maximlevitsky@gmail.com>
>
> Ping. can we get this added to linux-next, please?
Sorry, it's there, but there are still build errors.
I will look at those...
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH -next] mtd/nand/r852: fix build for CONFIG_PCI disabled
2010-03-11 16:34 ` Randy Dunlap
@ 2010-03-11 17:10 ` Randy Dunlap
2010-03-11 20:59 ` Maxim Levitsky
0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2010-03-11 17:10 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, Maxim Levitsky, LKML, Rafael J. Wysocki,
linux-next, linux-mtd, David Woodhouse
>
> Sorry, it's there, but there are still build errors.
> I will look at those...
>
From: Randy Dunlap <randy.dunlap@oracle.com>
r852 fails to build when CONFIG_PCI is not enabled since it uses
pci_*() calls and is a PCI driver, so it should depend on PCI
to prevent build errors.
It should also #include <linux/pci.h>.
drivers/mtd/nand/r852.c:1053: error: implicit declaration of function 'pci_prepare_to_sleep'
drivers/mtd/nand/r852.c:1062: error: implicit declaration of function 'pci_back_from_sleep'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
---
drivers/mtd/nand/Kconfig | 1 +
drivers/mtd/nand/r852.c | 1 +
2 files changed, 2 insertions(+)
--- linux-next-20100311.orig/drivers/mtd/nand/Kconfig
+++ linux-next-20100311/drivers/mtd/nand/Kconfig
@@ -105,6 +105,7 @@ config MTD_NAND_IDS
config MTD_NAND_RICOH
tristate "Ricoh xD card reader"
default n
+ depends on PCI
select MTD_SM_COMMON
help
Enable support for Ricoh R5C852 xD card reader
--- linux-next-20100311.orig/drivers/mtd/nand/r852.c
+++ linux-next-20100311/drivers/mtd/nand/r852.c
@@ -12,6 +12,7 @@
#include <linux/jiffies.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
+#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/delay.h>
#include <asm/byteorder.h>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] mtd/nand/r852: fix build for CONFIG_PCI disabled
2010-03-11 17:10 ` [PATCH -next] mtd/nand/r852: fix build for CONFIG_PCI disabled Randy Dunlap
@ 2010-03-11 20:59 ` Maxim Levitsky
0 siblings, 0 replies; 6+ messages in thread
From: Maxim Levitsky @ 2010-03-11 20:59 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, LKML, Rafael J. Wysocki, linux-next, linux-mtd,
David Woodhouse
On Thu, 2010-03-11 at 09:10 -0800, Randy Dunlap wrote:
> >
> > Sorry, it's there, but there are still build errors.
> > I will look at those...
> >
>
>
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> r852 fails to build when CONFIG_PCI is not enabled since it uses
> pci_*() calls and is a PCI driver, so it should depend on PCI
> to prevent build errors.
> It should also #include <linux/pci.h>.
Folks, sorry for Kconfig mess, I didn't test it well enough it seems...
However, I #include the <linux/pci.h> in r852.h, so I don't think it is
necessary here.
Also, I disagree with the unconditional dependency on nand in sm_ftl.
The purpose of CONFIG_SM_FTL_MUSEUM is solely to make it independent of
nand. I'll look at how to fix that properly.
Best regards,
Maxim Levitsky
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-11 20:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20100301210210.c6f465e6.sfr@canb.auug.org.au>
2010-03-01 21:54 ` [PATCH -next] mtd/nand/r852: fix build for CONFIG_PM=n Randy Dunlap
2010-03-02 12:02 ` Maxim Levitsky
2010-03-11 16:29 ` Randy Dunlap
2010-03-11 16:34 ` Randy Dunlap
2010-03-11 17:10 ` [PATCH -next] mtd/nand/r852: fix build for CONFIG_PCI disabled Randy Dunlap
2010-03-11 20:59 ` Maxim Levitsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox