RE: [PATCH] [trivial] i2c: Fix typo in i2c-bfin-twi.c
Acked-by: Sonic Zhang >-Original Message- >From: Masanari Iida [mailto:standby2...@gmail.com] >Sent: Tuesday, July 28, 2015 7:11 PM >To: triv...@kernel.org; Zhang, Sonic; w...@the-dreams.de; >linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; >bryan...@analog.com >Cc: Masanari Iida >Subject: [PATCH] [trivial] i2c: Fix typo in i2c-bfin-twi.c > >This patch fix some typos found in a printk message and MODULE_DESCRIPTION. > >Signed-off-by: Masanari Iida >--- > drivers/i2c/busses/i2c-bfin-twi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/drivers/i2c/busses/i2c-bfin-twi.c >b/drivers/i2c/busses/i2c-bfin-twi.c >index af162b4..025686d 100644 >--- a/drivers/i2c/busses/i2c-bfin-twi.c >+++ b/drivers/i2c/busses/i2c-bfin-twi.c >@@ -692,7 +692,7 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) > > platform_set_drvdata(pdev, iface); > >- dev_info(>dev, "Blackfin BF5xx on-chip I2C TWI Contoller, " >+ dev_info(>dev, "Blackfin BF5xx on-chip I2C TWI Controller, " > "regs_base@%p\n", iface->regs_base); > > return 0; >@@ -735,6 +735,6 @@ subsys_initcall(i2c_bfin_twi_init); > module_exit(i2c_bfin_twi_exit); > > MODULE_AUTHOR("Bryan Wu, Sonic Zhang"); -MODULE_DESCRIPTION("Blackfin BF5xx > on-chip I2C TWI Contoller >Driver"); >+MODULE_DESCRIPTION("Blackfin BF5xx on-chip I2C TWI Controller Driver"); > MODULE_LICENSE("GPL"); > MODULE_ALIAS("platform:i2c-bfin-twi"); >-- >2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] [trivial] i2c: Fix typo in i2c-bfin-twi.c
Acked-by: Sonic Zhang sonic.zh...@analog.com -Original Message- From: Masanari Iida [mailto:standby2...@gmail.com] Sent: Tuesday, July 28, 2015 7:11 PM To: triv...@kernel.org; Zhang, Sonic; w...@the-dreams.de; linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; bryan...@analog.com Cc: Masanari Iida Subject: [PATCH] [trivial] i2c: Fix typo in i2c-bfin-twi.c This patch fix some typos found in a printk message and MODULE_DESCRIPTION. Signed-off-by: Masanari Iida standby2...@gmail.com --- drivers/i2c/busses/i2c-bfin-twi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index af162b4..025686d 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -692,7 +692,7 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, iface); - dev_info(pdev-dev, Blackfin BF5xx on-chip I2C TWI Contoller, + dev_info(pdev-dev, Blackfin BF5xx on-chip I2C TWI Controller, regs_base@%p\n, iface-regs_base); return 0; @@ -735,6 +735,6 @@ subsys_initcall(i2c_bfin_twi_init); module_exit(i2c_bfin_twi_exit); MODULE_AUTHOR(Bryan Wu, Sonic Zhang); -MODULE_DESCRIPTION(Blackfin BF5xx on-chip I2C TWI Contoller Driver); +MODULE_DESCRIPTION(Blackfin BF5xx on-chip I2C TWI Controller Driver); MODULE_LICENSE(GPL); MODULE_ALIAS(platform:i2c-bfin-twi); -- 2.5.0 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [Adi-buildroot-devel] [Consult] blackfin: About one building break issue for STACKTRACE
Hi Gang, Please only use the GCC for Blackfin 2013R1 or 2014R1 from https://sourceforge.net/projects/adi-buildroot/files/ . Upstream GCC5 isn't ported to Blackfin properly. Regards, Sonic >-Original Message- >From: Chen Gang [mailto:xili_gchen_5...@hotmail.com] >Sent: Thursday, April 16, 2015 11:22 PM >To: real...@gmail.com; Richard Weinberger >Cc: adi-buildroot-de...@lists.sourceforge.net; linux-kernel@vger.kernel.org >Subject: [Adi-buildroot-devel] [Consult] blackfin: About one building break >issue for STACKTRACE > >Hello Maintainers: > >I want to consult one building issue about blackfin, the related issue >is: > >CC arch/blackfin/kernel/stacktrace.o > arch/blackfin/kernel/stacktrace.c: In function 'save_stack_trace': > arch/blackfin/kernel/stacktrace.c:23:6: error: frame pointer required, but > reserved > void save_stack_trace(struct stack_trace *trace) >^ > arch/blackfin/kernel/stacktrace.c:13:24: note: for 'current_frame_pointer' > register unsigned long current_frame_pointer asm("FP"); > ^ > >For me: > > - Originally, I treated it as gcc's issue, but after think of, for me, > gcc is OK: > >"-fomit-frame-pointer" is needed by extern "FP" pointer. > >"-fomit-frame-pointer" is against "-pg" (they can not be together). > > - For kernel: > >STACKTRACE needs "-fomit-frame-pointer", and FUNCTION_TRACER will >enable "-pg", > >FUNCTION_TRACER and STACKTRACE are related. > >The related commit: "1c873be Blackfin: initial support for ftrace" >(the commit time point is Jun 9 2009). > > - After this related commit, it never can pass building by upstream > blackfin gcc5: > >make defconfig && make menuconfig > >enable FUNCTION_TRACER (which also enable STACKTRACE) > >make (which will cause building break) > >So I want to consult: > > - Is it OK to use upstream gcc5 for blackfin? (or which gcc version is > suitable for building blackfin Linux kernel?) > > - Did the original commit pass building ? (e.g. by one of old gcc > version). > > - How to fix this issue, next? > > >Welcome any members ideas, suggestions and completions. > >Thanks. >-- >Chen Gang > >Open, share, and attitude like air, water, and life which God blessed > >-- >BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own >process in accordance with the BPMN >2 standard Learn Process modeling best practices with Bonita BPM through live >exercises >http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ >source=Sourceforge_BPM_Camp_5_6_15_medium=email_campaign=VA_SF >___ >Adi-buildroot-devel mailing list >adi-buildroot-de...@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/adi-buildroot-devel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [Adi-buildroot-devel] [Consult] blackfin: About one building break issue for STACKTRACE
Hi Gang, Please only use the GCC for Blackfin 2013R1 or 2014R1 from https://sourceforge.net/projects/adi-buildroot/files/ . Upstream GCC5 isn't ported to Blackfin properly. Regards, Sonic -Original Message- From: Chen Gang [mailto:xili_gchen_5...@hotmail.com] Sent: Thursday, April 16, 2015 11:22 PM To: real...@gmail.com; Richard Weinberger Cc: adi-buildroot-de...@lists.sourceforge.net; linux-kernel@vger.kernel.org Subject: [Adi-buildroot-devel] [Consult] blackfin: About one building break issue for STACKTRACE Hello Maintainers: I want to consult one building issue about blackfin, the related issue is: CC arch/blackfin/kernel/stacktrace.o arch/blackfin/kernel/stacktrace.c: In function 'save_stack_trace': arch/blackfin/kernel/stacktrace.c:23:6: error: frame pointer required, but reserved void save_stack_trace(struct stack_trace *trace) ^ arch/blackfin/kernel/stacktrace.c:13:24: note: for 'current_frame_pointer' register unsigned long current_frame_pointer asm(FP); ^ For me: - Originally, I treated it as gcc's issue, but after think of, for me, gcc is OK: -fomit-frame-pointer is needed by extern FP pointer. -fomit-frame-pointer is against -pg (they can not be together). - For kernel: STACKTRACE needs -fomit-frame-pointer, and FUNCTION_TRACER will enable -pg, FUNCTION_TRACER and STACKTRACE are related. The related commit: 1c873be Blackfin: initial support for ftrace (the commit time point is Jun 9 2009). - After this related commit, it never can pass building by upstream blackfin gcc5: make defconfig make menuconfig enable FUNCTION_TRACER (which also enable STACKTRACE) make (which will cause building break) So I want to consult: - Is it OK to use upstream gcc5 for blackfin? (or which gcc version is suitable for building blackfin Linux kernel?) - Did the original commit pass building ? (e.g. by one of old gcc version). - How to fix this issue, next? Welcome any members ideas, suggestions and completions. Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF ___ Adi-buildroot-devel mailing list adi-buildroot-de...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/adi-buildroot-devel -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [Adi-buildroot-devel] [PATCH] arch: blackfin: kernel: kgdb: Remove unused function
Acked-by: Sonic Zhang Sonic >-Original Message- >From: Rickard Strandqvist [mailto:rickard_strandqv...@spectrumdigital.se] >Sent: Friday, January 02, 2015 1:54 AM >To: Steven Miao; adi-buildroot-de...@lists.sourceforge.net >Cc: linux-kernel@vger.kernel.org; Rickard Strandqvist >Subject: [Adi-buildroot-devel] [PATCH] arch: blackfin: kernel: kgdb: Remove >unused function > >Remove the function kgdb_post_primary_code() that is not used anywhere. > >This was partially found by using a static code analysis program called >cppcheck. > >Signed-off-by: Rickard Strandqvist >--- > arch/blackfin/kernel/kgdb.c | 13 - > 1 file changed, 13 deletions(-) > >diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c index >fa53fae..b1cc04f 100644 >--- a/arch/blackfin/kernel/kgdb.c >+++ b/arch/blackfin/kernel/kgdb.c >@@ -359,19 +359,6 @@ void kgdb_roundup_cpu(int cpu, unsigned long flags) >static unsigned long kgdb_arch_imask; #endif > >-void kgdb_post_primary_code(struct pt_regs *regs, int e_vector, int err_code) >-{ >- if (kgdb_single_step) >- preempt_enable(); >- >-#ifdef CONFIG_IPIPE >- if (kgdb_arch_imask) { >- cpu_pda[raw_smp_processor_id()].ex_imask = kgdb_arch_imask; >- kgdb_arch_imask = 0; >- } >-#endif >-} >- > int kgdb_arch_handle_exception(int vector, int signo, > int err_code, char *remcom_in_buffer, > char *remcom_out_buffer, >-- >1.7.10.4 > > >-- >Dive into the World of Parallel Programming! The Go Parallel Website, >sponsored by Intel and developed in partnership with Slashdot Media, is your >hub for all things parallel software development, from weekly thought >leadership blogs to news, videos, case studies, tutorials and more. Take a >look and join the conversation now. http://goparallel.sourceforge.net >___ >Adi-buildroot-devel mailing list >adi-buildroot-de...@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/adi-buildroot-devel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [Adi-buildroot-devel] [PATCH] arch: blackfin: kernel: kgdb: Remove unused function
Acked-by: Sonic Zhang sonic.zh...@analog.com Sonic -Original Message- From: Rickard Strandqvist [mailto:rickard_strandqv...@spectrumdigital.se] Sent: Friday, January 02, 2015 1:54 AM To: Steven Miao; adi-buildroot-de...@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org; Rickard Strandqvist Subject: [Adi-buildroot-devel] [PATCH] arch: blackfin: kernel: kgdb: Remove unused function Remove the function kgdb_post_primary_code() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/blackfin/kernel/kgdb.c | 13 - 1 file changed, 13 deletions(-) diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c index fa53fae..b1cc04f 100644 --- a/arch/blackfin/kernel/kgdb.c +++ b/arch/blackfin/kernel/kgdb.c @@ -359,19 +359,6 @@ void kgdb_roundup_cpu(int cpu, unsigned long flags) static unsigned long kgdb_arch_imask; #endif -void kgdb_post_primary_code(struct pt_regs *regs, int e_vector, int err_code) -{ - if (kgdb_single_step) - preempt_enable(); - -#ifdef CONFIG_IPIPE - if (kgdb_arch_imask) { - cpu_pda[raw_smp_processor_id()].ex_imask = kgdb_arch_imask; - kgdb_arch_imask = 0; - } -#endif -} - int kgdb_arch_handle_exception(int vector, int signo, int err_code, char *remcom_in_buffer, char *remcom_out_buffer, -- 1.7.10.4 -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Adi-buildroot-devel mailing list adi-buildroot-de...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/adi-buildroot-devel -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: blackfin: Kconfig symbol VIDEO_MT9M114?
Hi Paul, I will send out a patch to remove it. Regards, Sonic >-Original Message- >From: Paul Bolle [mailto:pebo...@tiscali.nl] >Sent: Thursday, February 13, 2014 5:30 PM >To: Steven Miao >Cc: Zhang, Sonic; Richard Weinberger; >adi-buildroot-de...@lists.sourceforge.net; >open list:CAN NETWORK DRIVERS , open >list:NETWORKING DRIVERS , open list >Subject: Re: blackfin: Kconfig symbol VIDEO_MT9M114? > >Hi Steven, > >On Thu, 2014-02-13 at 17:00 +0800, Steven Miao wrote: >> VIDEO_MT9M114 is from patch "Aptina mt9m114 HD digital image sensor >> driver", but unfortunately this patch hasn't been accepted yet. >> https://patchwork.linuxtv.org/patch/16308/ >> This Kconfig symbol should be removed until the mt9m114 driver is >> accepted by mainline. > >Thanks for looking into this. > >It's easy for me to submit a trivial patch to remove the one line depending on >these >Kconfig macros. But it seems that line should be added to the queue for that >driver at >the same time, otherwise we risk losing it. So it's safer if you or the people >working on >that driver coordinate that, isn't it? > > >Paul Bolle >
RE: blackfin: Kconfig symbol VIDEO_MT9M114?
Hi Paul, I will send out a patch to remove it. Regards, Sonic -Original Message- From: Paul Bolle [mailto:pebo...@tiscali.nl] Sent: Thursday, February 13, 2014 5:30 PM To: Steven Miao Cc: Zhang, Sonic; Richard Weinberger; adi-buildroot-de...@lists.sourceforge.net; open list:CAN NETWORK DRIVERS linux-...@vger.kernel.org, open list:NETWORKING DRIVERS net...@vger.kernel.org, open list Subject: Re: blackfin: Kconfig symbol VIDEO_MT9M114? Hi Steven, On Thu, 2014-02-13 at 17:00 +0800, Steven Miao wrote: VIDEO_MT9M114 is from patch Aptina mt9m114 HD digital image sensor driver, but unfortunately this patch hasn't been accepted yet. https://patchwork.linuxtv.org/patch/16308/ This Kconfig symbol should be removed until the mt9m114 driver is accepted by mainline. Thanks for looking into this. It's easy for me to submit a trivial patch to remove the one line depending on these Kconfig macros. But it seems that line should be added to the queue for that driver at the same time, otherwise we risk losing it. So it's safer if you or the people working on that driver coordinate that, isn't it? Paul Bolle
RE: [PATCH] mmc:bfin_sdh change driver to use dev_pm_ops infrastructure
Acked-by: Sonic Zhang >-Original Message- >From: Shuah Khan [mailto:shuah...@samsung.com] >Sent: Saturday, August 10, 2013 11:21 PM >To: Zhang, Sonic; c...@laptop.org >Cc: Shuah Khan; uclinux-dist-de...@blackfin.uclinux.org; >linux-...@vger.kernel.org; >linux-kernel@vger.kernel.org; shuahk...@gmail.com >Subject: [PATCH] mmc:bfin_sdh change driver to use dev_pm_ops infrastructure > >Change bfin sdh platform driver to register pm ops using dev_pm_ops instead of >legacy pm_ops infrastructure. > >Signed-off-by: Shuah Khan >--- > drivers/mmc/host/bfin_sdh.c | 21 - > 1 file changed, 12 insertions(+), 9 deletions(-) > >diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c index >94fae2f..7b3e12f 100644 >--- a/drivers/mmc/host/bfin_sdh.c >+++ b/drivers/mmc/host/bfin_sdh.c >@@ -638,10 +638,11 @@ static int sdh_remove(struct platform_device *pdev) } > > #ifdef CONFIG_PM >-static int sdh_suspend(struct platform_device *dev, pm_message_t state) >+static int sdh_suspend(struct device *dev) > { >- struct mmc_host *mmc = platform_get_drvdata(dev); >- struct bfin_sd_host *drv_data = get_sdh_data(dev); >+ struct platform_device *pdev = to_platform_device(dev); >+ struct mmc_host *mmc = platform_get_drvdata(pdev); >+ struct bfin_sd_host *drv_data = get_sdh_data(pdev); > int ret = 0; > > if (mmc) >@@ -652,15 +653,16 @@ static int sdh_suspend(struct platform_device *dev, >pm_message_t state) > return ret; > } > >-static int sdh_resume(struct platform_device *dev) >+static int sdh_resume(struct device *dev) > { >- struct mmc_host *mmc = platform_get_drvdata(dev); >- struct bfin_sd_host *drv_data = get_sdh_data(dev); >+ struct platform_device *pdev = to_platform_device(dev); >+ struct mmc_host *mmc = platform_get_drvdata(pdev); >+ struct bfin_sd_host *drv_data = get_sdh_data(pdev); > int ret = 0; > > ret = peripheral_request_list(drv_data->pin_req, DRIVER_NAME); > if (ret) { >- dev_err(>dev, "unable to request peripheral pins\n"); >+ dev_err(dev, "unable to request peripheral pins\n"); > return ret; > } > >@@ -676,13 +678,14 @@ static int sdh_resume(struct platform_device *dev) # >define sdh_resume NULL #endif > >+static SIMPLE_DEV_PM_OPS(sdh_dev_pm_ops, sdh_suspend, sdh_resume); >+ > static struct platform_driver sdh_driver = { > .probe = sdh_probe, > .remove = sdh_remove, >- .suspend = sdh_suspend, >- .resume = sdh_resume, > .driver = { > .name = DRIVER_NAME, >+ .pm = _dev_pm_ops, > }, > }; > >-- >1.7.10.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] mmc:bfin_sdh fix build warning in sdh_dma_irq()
Acked-by: Sonic Zhang >-Original Message- >From: Shuah Khan [mailto:shuah...@samsung.com] >Sent: Saturday, August 10, 2013 11:21 PM >To: Zhang, Sonic; c...@laptop.org >Cc: Shuah Khan; uclinux-dist-de...@blackfin.uclinux.org; >linux-...@vger.kernel.org; >linux-kernel@vger.kernel.org; shuahk...@gmail.com >Subject: [PATCH] mmc:bfin_sdh fix build warning in sdh_dma_irq() > >Fix the following build warning in sdh_dma_irq() >drivers/mmc/host/bfin_sdh.c:466:2: warning: format %lx expects argument of >type >long unsigned int , but argument 5 has type int [-Wformat] > dev_dbg(mmc_dev(host->mmc), "%s enter, irq_stat: 0x%04x\n", __func__, >get_dma_curr_irqstat(host->dma_ch)); > >Signed-off-by: Shuah Khan >--- > drivers/mmc/host/bfin_sdh.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c index >7b3e12f..61157c4 100644 >--- a/drivers/mmc/host/bfin_sdh.c >+++ b/drivers/mmc/host/bfin_sdh.c >@@ -463,7 +463,7 @@ static irqreturn_t sdh_dma_irq(int irq, void *devid) { > struct sdh_host *host = devid; > >- dev_dbg(mmc_dev(host->mmc), "%s enter, irq_stat: 0x%04lx\n", __func__, >+ dev_dbg(mmc_dev(host->mmc), "%s enter, irq_stat: 0x%04x\n", __func__, > get_dma_curr_irqstat(host->dma_ch)); > clear_dma_irqstat(host->dma_ch); > SSYNC(); >-- >1.7.10.4 >
RE: [PATCH] mmc:bfin_sdh fix build warning in sdh_dma_irq()
Acked-by: Sonic Zhangsonic.zh...@analog.com -Original Message- From: Shuah Khan [mailto:shuah...@samsung.com] Sent: Saturday, August 10, 2013 11:21 PM To: Zhang, Sonic; c...@laptop.org Cc: Shuah Khan; uclinux-dist-de...@blackfin.uclinux.org; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; shuahk...@gmail.com Subject: [PATCH] mmc:bfin_sdh fix build warning in sdh_dma_irq() Fix the following build warning in sdh_dma_irq() drivers/mmc/host/bfin_sdh.c:466:2: warning: format %lx expects argument of type long unsigned int , but argument 5 has type int [-Wformat] dev_dbg(mmc_dev(host-mmc), %s enter, irq_stat: 0x%04x\n, __func__, get_dma_curr_irqstat(host-dma_ch)); Signed-off-by: Shuah Khan shuah...@samsung.com --- drivers/mmc/host/bfin_sdh.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c index 7b3e12f..61157c4 100644 --- a/drivers/mmc/host/bfin_sdh.c +++ b/drivers/mmc/host/bfin_sdh.c @@ -463,7 +463,7 @@ static irqreturn_t sdh_dma_irq(int irq, void *devid) { struct sdh_host *host = devid; - dev_dbg(mmc_dev(host-mmc), %s enter, irq_stat: 0x%04lx\n, __func__, + dev_dbg(mmc_dev(host-mmc), %s enter, irq_stat: 0x%04x\n, __func__, get_dma_curr_irqstat(host-dma_ch)); clear_dma_irqstat(host-dma_ch); SSYNC(); -- 1.7.10.4
RE: [PATCH] mmc:bfin_sdh change driver to use dev_pm_ops infrastructure
Acked-by: Sonic Zhangsonic.zh...@analog.com -Original Message- From: Shuah Khan [mailto:shuah...@samsung.com] Sent: Saturday, August 10, 2013 11:21 PM To: Zhang, Sonic; c...@laptop.org Cc: Shuah Khan; uclinux-dist-de...@blackfin.uclinux.org; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; shuahk...@gmail.com Subject: [PATCH] mmc:bfin_sdh change driver to use dev_pm_ops infrastructure Change bfin sdh platform driver to register pm ops using dev_pm_ops instead of legacy pm_ops infrastructure. Signed-off-by: Shuah Khan shuah...@samsung.com --- drivers/mmc/host/bfin_sdh.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c index 94fae2f..7b3e12f 100644 --- a/drivers/mmc/host/bfin_sdh.c +++ b/drivers/mmc/host/bfin_sdh.c @@ -638,10 +638,11 @@ static int sdh_remove(struct platform_device *pdev) } #ifdef CONFIG_PM -static int sdh_suspend(struct platform_device *dev, pm_message_t state) +static int sdh_suspend(struct device *dev) { - struct mmc_host *mmc = platform_get_drvdata(dev); - struct bfin_sd_host *drv_data = get_sdh_data(dev); + struct platform_device *pdev = to_platform_device(dev); + struct mmc_host *mmc = platform_get_drvdata(pdev); + struct bfin_sd_host *drv_data = get_sdh_data(pdev); int ret = 0; if (mmc) @@ -652,15 +653,16 @@ static int sdh_suspend(struct platform_device *dev, pm_message_t state) return ret; } -static int sdh_resume(struct platform_device *dev) +static int sdh_resume(struct device *dev) { - struct mmc_host *mmc = platform_get_drvdata(dev); - struct bfin_sd_host *drv_data = get_sdh_data(dev); + struct platform_device *pdev = to_platform_device(dev); + struct mmc_host *mmc = platform_get_drvdata(pdev); + struct bfin_sd_host *drv_data = get_sdh_data(pdev); int ret = 0; ret = peripheral_request_list(drv_data-pin_req, DRIVER_NAME); if (ret) { - dev_err(dev-dev, unable to request peripheral pins\n); + dev_err(dev, unable to request peripheral pins\n); return ret; } @@ -676,13 +678,14 @@ static int sdh_resume(struct platform_device *dev) # define sdh_resume NULL #endif +static SIMPLE_DEV_PM_OPS(sdh_dev_pm_ops, sdh_suspend, sdh_resume); + static struct platform_driver sdh_driver = { .probe = sdh_probe, .remove = sdh_remove, - .suspend = sdh_suspend, - .resume = sdh_resume, .driver = { .name = DRIVER_NAME, + .pm = sdh_dev_pm_ops, }, }; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH RFC v3 1/3] i2c: i2c-bfin-twi: convert to devm_* API
Acked-by: Sonic Zhang >-Original Message- >From: Libo Chen [mailto:libo.c...@huawei.com] >Sent: Thursday, May 23, 2013 8:00 PM >To: w...@the-dreams.de >Cc: guz.f...@cn.fujitsu.com; Zhang, Sonic; uclinux-dist- >de...@blackfin.uclinux.org; linux-...@vger.kernel.org; linux- >ker...@vger.kernel.org; lize...@huawei.com; libo.c...@huawei.com >Subject: [PATCH RFC v3 1/3] i2c: i2c-bfin-twi: convert to devm_* API > >peripheral_request_list has got free if any one faild, so no need to free >again in err >case. >aovid this, convert them to devm_* API > >Signed-off-by: Libo Chen >--- > drivers/i2c/busses/i2c-bfin-twi.c | 38 +--- > 1 files changed, 10 insertions(+), 28 deletions(-) > >diff --git a/drivers/i2c/busses/i2c-bfin-twi.c >b/drivers/i2c/busses/i2c-bfin-twi.c >index 05080c4..2b99c48 100644 >--- a/drivers/i2c/busses/i2c-bfin-twi.c >+++ b/drivers/i2c/busses/i2c-bfin-twi.c >@@ -621,35 +621,27 @@ static int i2c_bfin_twi_probe(struct platform_device >*pdev) > int rc; > unsigned int clkhilow; > >- iface = kzalloc(sizeof(struct bfin_twi_iface), GFP_KERNEL); >+ iface = devm_kzalloc(>dev, sizeof(struct bfin_twi_iface), >+ GFP_KERNEL); > if (!iface) { > dev_err(>dev, "Cannot allocate memory\n"); >- rc = -ENOMEM; >- goto out_error_nomem; >+ return -ENOMEM; > } > > spin_lock_init(&(iface->lock)); > > /* Find and map our resources */ > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >- if (res == NULL) { >- dev_err(>dev, "Cannot get IORESOURCE_MEM\n"); >- rc = -ENOENT; >- goto out_error_get_res; >- } >- >- iface->regs_base = ioremap(res->start, resource_size(res)); >- if (iface->regs_base == NULL) { >+ iface->regs_base = devm_ioremap_resource(>dev, res); >+ if (IS_ERR(iface->regs_base)) { > dev_err(>dev, "Cannot map IO\n"); >- rc = -ENXIO; >- goto out_error_ioremap; >+ return -ENXIO; > } > > iface->irq = platform_get_irq(pdev, 0); > if (iface->irq < 0) { > dev_err(>dev, "No IRQ specified\n"); >- rc = -ENOENT; >- goto out_error_no_irq; >+ return -ENOENT; > } > > p_adap = >adap; >@@ -666,10 +658,10 @@ static int i2c_bfin_twi_probe(struct platform_device >*pdev) > "i2c-bfin-twi"); > if (rc) { > dev_err(>dev, "Can't setup pin mux!\n"); >- goto out_error_pin_mux; >+ return rc; > } > >- rc = request_irq(iface->irq, bfin_twi_interrupt_entry, >+ rc = devm_request_irq(>dev, iface->irq, >+bfin_twi_interrupt_entry, > 0, pdev->name, iface); > if (rc) { > dev_err(>dev, "Can't get IRQ %d !\n", iface->irq); @@ - >707,16 +699,9 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) > return 0; > > out_error_add_adapter: >- free_irq(iface->irq, iface); > out_error_req_irq: >-out_error_no_irq: > peripheral_free_list((unsigned short *)pdev->dev.platform_data); >-out_error_pin_mux: >- iounmap(iface->regs_base); >-out_error_ioremap: >-out_error_get_res: >- kfree(iface); >-out_error_nomem: >+ > return rc; > } > >@@ -725,10 +710,7 @@ static int i2c_bfin_twi_remove(struct platform_device >*pdev) > struct bfin_twi_iface *iface = platform_get_drvdata(pdev); > > i2c_del_adapter(&(iface->adap)); >- free_irq(iface->irq, iface); > peripheral_free_list((unsigned short *)pdev->dev.platform_data); >- iounmap(iface->regs_base); >- kfree(iface); > > return 0; > } >-- >1.7.1 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH RFC v3 1/3] i2c: i2c-bfin-twi: convert to devm_* API
Hi Libo, >-Original Message- >From: Libo Chen [mailto:libo.c...@huawei.com] >Sent: Thursday, May 23, 2013 8:00 PM >To: w...@the-dreams.de >Cc: guz.f...@cn.fujitsu.com; Zhang, Sonic; uclinux-dist- >de...@blackfin.uclinux.org; linux-...@vger.kernel.org; linux- >ker...@vger.kernel.org; lize...@huawei.com; libo.c...@huawei.com >Subject: [PATCH RFC v3 1/3] i2c: i2c-bfin-twi: convert to devm_* API > >peripheral_request_list has got free if any one faild, so no need to free >again in err >case. >aovid this, convert them to devm_* API > >Signed-off-by: Libo Chen >--- > drivers/i2c/busses/i2c-bfin-twi.c | 38 +--- > 1 files changed, 10 insertions(+), 28 deletions(-) > >diff --git a/drivers/i2c/busses/i2c-bfin-twi.c >b/drivers/i2c/busses/i2c-bfin-twi.c >index 05080c4..2b99c48 100644 >--- a/drivers/i2c/busses/i2c-bfin-twi.c >+++ b/drivers/i2c/busses/i2c-bfin-twi.c >@@ -621,35 +621,27 @@ static int i2c_bfin_twi_probe(struct platform_device >*pdev) > int rc; > unsigned int clkhilow; > >- iface = kzalloc(sizeof(struct bfin_twi_iface), GFP_KERNEL); >+ iface = devm_kzalloc(>dev, sizeof(struct bfin_twi_iface), >+ GFP_KERNEL); > if (!iface) { > dev_err(>dev, "Cannot allocate memory\n"); >- rc = -ENOMEM; >- goto out_error_nomem; >+ return -ENOMEM; > } > > spin_lock_init(&(iface->lock)); > > /* Find and map our resources */ > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >- if (res == NULL) { >- dev_err(>dev, "Cannot get IORESOURCE_MEM\n"); >- rc = -ENOENT; >- goto out_error_get_res; >- } Why remove the resource mem check? Regards, Sonic -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH RFC v3 1/3] i2c: i2c-bfin-twi: convert to devm_* API
Hi Libo, -Original Message- From: Libo Chen [mailto:libo.c...@huawei.com] Sent: Thursday, May 23, 2013 8:00 PM To: w...@the-dreams.de Cc: guz.f...@cn.fujitsu.com; Zhang, Sonic; uclinux-dist- de...@blackfin.uclinux.org; linux-...@vger.kernel.org; linux- ker...@vger.kernel.org; lize...@huawei.com; libo.c...@huawei.com Subject: [PATCH RFC v3 1/3] i2c: i2c-bfin-twi: convert to devm_* API peripheral_request_list has got free if any one faild, so no need to free again in err case. aovid this, convert them to devm_* API Signed-off-by: Libo Chen libo.c...@huawei.com --- drivers/i2c/busses/i2c-bfin-twi.c | 38 +--- 1 files changed, 10 insertions(+), 28 deletions(-) diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 05080c4..2b99c48 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -621,35 +621,27 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) int rc; unsigned int clkhilow; - iface = kzalloc(sizeof(struct bfin_twi_iface), GFP_KERNEL); + iface = devm_kzalloc(pdev-dev, sizeof(struct bfin_twi_iface), + GFP_KERNEL); if (!iface) { dev_err(pdev-dev, Cannot allocate memory\n); - rc = -ENOMEM; - goto out_error_nomem; + return -ENOMEM; } spin_lock_init((iface-lock)); /* Find and map our resources */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) { - dev_err(pdev-dev, Cannot get IORESOURCE_MEM\n); - rc = -ENOENT; - goto out_error_get_res; - } Why remove the resource mem check? Regards, Sonic -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH RFC v3 1/3] i2c: i2c-bfin-twi: convert to devm_* API
Acked-by: Sonic Zhang sonic.zh...@analog.com -Original Message- From: Libo Chen [mailto:libo.c...@huawei.com] Sent: Thursday, May 23, 2013 8:00 PM To: w...@the-dreams.de Cc: guz.f...@cn.fujitsu.com; Zhang, Sonic; uclinux-dist- de...@blackfin.uclinux.org; linux-...@vger.kernel.org; linux- ker...@vger.kernel.org; lize...@huawei.com; libo.c...@huawei.com Subject: [PATCH RFC v3 1/3] i2c: i2c-bfin-twi: convert to devm_* API peripheral_request_list has got free if any one faild, so no need to free again in err case. aovid this, convert them to devm_* API Signed-off-by: Libo Chen libo.c...@huawei.com --- drivers/i2c/busses/i2c-bfin-twi.c | 38 +--- 1 files changed, 10 insertions(+), 28 deletions(-) diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 05080c4..2b99c48 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -621,35 +621,27 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) int rc; unsigned int clkhilow; - iface = kzalloc(sizeof(struct bfin_twi_iface), GFP_KERNEL); + iface = devm_kzalloc(pdev-dev, sizeof(struct bfin_twi_iface), + GFP_KERNEL); if (!iface) { dev_err(pdev-dev, Cannot allocate memory\n); - rc = -ENOMEM; - goto out_error_nomem; + return -ENOMEM; } spin_lock_init((iface-lock)); /* Find and map our resources */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) { - dev_err(pdev-dev, Cannot get IORESOURCE_MEM\n); - rc = -ENOENT; - goto out_error_get_res; - } - - iface-regs_base = ioremap(res-start, resource_size(res)); - if (iface-regs_base == NULL) { + iface-regs_base = devm_ioremap_resource(pdev-dev, res); + if (IS_ERR(iface-regs_base)) { dev_err(pdev-dev, Cannot map IO\n); - rc = -ENXIO; - goto out_error_ioremap; + return -ENXIO; } iface-irq = platform_get_irq(pdev, 0); if (iface-irq 0) { dev_err(pdev-dev, No IRQ specified\n); - rc = -ENOENT; - goto out_error_no_irq; + return -ENOENT; } p_adap = iface-adap; @@ -666,10 +658,10 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) i2c-bfin-twi); if (rc) { dev_err(pdev-dev, Can't setup pin mux!\n); - goto out_error_pin_mux; + return rc; } - rc = request_irq(iface-irq, bfin_twi_interrupt_entry, + rc = devm_request_irq(pdev-dev, iface-irq, +bfin_twi_interrupt_entry, 0, pdev-name, iface); if (rc) { dev_err(pdev-dev, Can't get IRQ %d !\n, iface-irq); @@ - 707,16 +699,9 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) return 0; out_error_add_adapter: - free_irq(iface-irq, iface); out_error_req_irq: -out_error_no_irq: peripheral_free_list((unsigned short *)pdev-dev.platform_data); -out_error_pin_mux: - iounmap(iface-regs_base); -out_error_ioremap: -out_error_get_res: - kfree(iface); -out_error_nomem: + return rc; } @@ -725,10 +710,7 @@ static int i2c_bfin_twi_remove(struct platform_device *pdev) struct bfin_twi_iface *iface = platform_get_drvdata(pdev); i2c_del_adapter((iface-adap)); - free_irq(iface-irq, iface); peripheral_free_list((unsigned short *)pdev-dev.platform_data); - iounmap(iface-regs_base); - kfree(iface); return 0; } -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful
Hi Libo, >-Original Message- >From: Libo Chen [mailto:clbchenlibo.c...@huawei.com] >Sent: Friday, May 10, 2013 9:02 AM >To: Zhang, Sonic >Cc: Libo Chen; w...@the-dreams.de; uclinux-dist-de...@blackfin.uclinux.org; >linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; lize...@huawei.com >Subject: Re: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it >init >successful > >On 2013/5/9 16:33, Zhang, Sonic wrote: >> Hi Libo, >> >>> -Original Message- >>> From: Libo Chen [mailto:libo.c...@huawei.com] >>> Sent: Thursday, May 09, 2013 4:27 PM >>> To: Zhang, Sonic; w...@the-dreams.de >>> Cc: uclinux-dist-de...@blackfin.uclinux.org; >>> linux-kernel@vger.kernel.org; linux- i...@vger.kernel.org; >>> lize...@huawei.com; Libo Chen >>> Subject: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral >>> before it init successful >>> >>> down out_error_no_irq. When platform_get_irq fail, no need to free >>> peripheral >>> >>> Signed-off-by: Libo Chen >>> --- >>> drivers/i2c/busses/i2c-bfin-twi.c |2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/drivers/i2c/busses/i2c-bfin-twi.c >>> b/drivers/i2c/busses/i2c-bfin-twi.c >>> index 05080c4..6617645 100644 >>> --- a/drivers/i2c/busses/i2c-bfin-twi.c >>> +++ b/drivers/i2c/busses/i2c-bfin-twi.c >>> @@ -709,9 +709,9 @@ static int i2c_bfin_twi_probe(struct >>> platform_device *pdev) >>> out_error_add_adapter: >>> free_irq(iface->irq, iface); >>> out_error_req_irq: >>> -out_error_no_irq: >>> peripheral_free_list((unsigned short >>> *)pdev->dev.platform_data); >>> out_error_pin_mux: >>> +out_error_no_irq: >>> iounmap(iface->regs_base); >>> out_error_ioremap: >>> out_error_get_res: >>> -- >> >> Sorry, but you didn't exchange as I suggested. >> Should be >> > >Hi Sonic, > >Look at peripheral_request_list() >{ > u16 cnt; > int ret; > > for (cnt = 0; per[cnt] != 0; cnt++) { > > ret = peripheral_request(per[cnt], label); > > if (ret < 0) { > for ( ; cnt > 0; cnt--) > peripheral_free(per[cnt - 1]); > > return ret; > } > } > > return 0; >} > > >When peripheral_request fail, it had called peripheral_free(). >So there is no reason to call peripheral_free_list again. > >Did I miss something else? > > Yes, you are right. They are freed in peripheral_request_list() if any one fails. You have my ACK on this patch. Regards, Sonic -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful
Hi Libo, -Original Message- From: Libo Chen [mailto:clbchenlibo.c...@huawei.com] Sent: Friday, May 10, 2013 9:02 AM To: Zhang, Sonic Cc: Libo Chen; w...@the-dreams.de; uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; lize...@huawei.com Subject: Re: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful On 2013/5/9 16:33, Zhang, Sonic wrote: Hi Libo, -Original Message- From: Libo Chen [mailto:libo.c...@huawei.com] Sent: Thursday, May 09, 2013 4:27 PM To: Zhang, Sonic; w...@the-dreams.de Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; linux- i...@vger.kernel.org; lize...@huawei.com; Libo Chen Subject: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful down out_error_no_irq. When platform_get_irq fail, no need to free peripheral Signed-off-by: Libo Chen libo.c...@huawei.com --- drivers/i2c/busses/i2c-bfin-twi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 05080c4..6617645 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -709,9 +709,9 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) out_error_add_adapter: free_irq(iface-irq, iface); out_error_req_irq: -out_error_no_irq: peripheral_free_list((unsigned short *)pdev-dev.platform_data); out_error_pin_mux: +out_error_no_irq: iounmap(iface-regs_base); out_error_ioremap: out_error_get_res: -- Sorry, but you didn't exchange as I suggested. Should be Hi Sonic, Look at peripheral_request_list() { u16 cnt; int ret; for (cnt = 0; per[cnt] != 0; cnt++) { ret = peripheral_request(per[cnt], label); if (ret 0) { for ( ; cnt 0; cnt--) peripheral_free(per[cnt - 1]); return ret; } } return 0; } When peripheral_request fail, it had called peripheral_free(). So there is no reason to call peripheral_free_list again. Did I miss something else? Yes, you are right. They are freed in peripheral_request_list() if any one fails. You have my ACK on this patch. Regards, Sonic -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful
Please ignore my Ack. Sonic >-Original Message- >From: Zhang, Sonic >Sent: Thursday, May 09, 2013 4:31 PM >To: 'Libo Chen'; w...@the-dreams.de >Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; >linux- >i...@vger.kernel.org; lize...@huawei.com >Subject: RE: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it >init >successful > >Acked-by: Sonic Zhang > >>-Original Message- >>From: Libo Chen [mailto:libo.c...@huawei.com] >>Sent: Thursday, May 09, 2013 4:27 PM >>To: Zhang, Sonic; w...@the-dreams.de >>Cc: uclinux-dist-de...@blackfin.uclinux.org; >>linux-kernel@vger.kernel.org; linux- i...@vger.kernel.org; >>lize...@huawei.com; Libo Chen >>Subject: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before >>it init successful >> >>down out_error_no_irq. When platform_get_irq fail, no need to free >>peripheral >> >>Signed-off-by: Libo Chen >>--- >> drivers/i2c/busses/i2c-bfin-twi.c |2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >>diff --git a/drivers/i2c/busses/i2c-bfin-twi.c >>b/drivers/i2c/busses/i2c-bfin-twi.c >>index 05080c4..6617645 100644 >>--- a/drivers/i2c/busses/i2c-bfin-twi.c >>+++ b/drivers/i2c/busses/i2c-bfin-twi.c >>@@ -709,9 +709,9 @@ static int i2c_bfin_twi_probe(struct >>platform_device *pdev) >> out_error_add_adapter: >> free_irq(iface->irq, iface); >> out_error_req_irq: >>-out_error_no_irq: >> peripheral_free_list((unsigned short *)pdev->dev.platform_data); >> out_error_pin_mux: >>+out_error_no_irq: >> iounmap(iface->regs_base); >> out_error_ioremap: >> out_error_get_res: >>-- >>1.7.1 >> >> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful
Hi Libo, >-Original Message- >From: Libo Chen [mailto:libo.c...@huawei.com] >Sent: Thursday, May 09, 2013 4:27 PM >To: Zhang, Sonic; w...@the-dreams.de >Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; >linux- >i...@vger.kernel.org; lize...@huawei.com; Libo Chen >Subject: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init >successful > >down out_error_no_irq. When platform_get_irq fail, no need to free peripheral > >Signed-off-by: Libo Chen >--- > drivers/i2c/busses/i2c-bfin-twi.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/drivers/i2c/busses/i2c-bfin-twi.c >b/drivers/i2c/busses/i2c-bfin-twi.c >index 05080c4..6617645 100644 >--- a/drivers/i2c/busses/i2c-bfin-twi.c >+++ b/drivers/i2c/busses/i2c-bfin-twi.c >@@ -709,9 +709,9 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) > out_error_add_adapter: > free_irq(iface->irq, iface); > out_error_req_irq: >-out_error_no_irq: > peripheral_free_list((unsigned short *)pdev->dev.platform_data); > out_error_pin_mux: >+out_error_no_irq: > iounmap(iface->regs_base); > out_error_ioremap: > out_error_get_res: >-- Sorry, but you didn't exchange as I suggested. Should be > out_error_req_irq: >-out_error_no_irq: >+out_error_pin_mux: > peripheral_free_list((unsigned short *)pdev->dev.platform_data); >-out_error_pin_mux: >+out_error_no_irq: Regards, Sonic -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful
Acked-by: Sonic Zhang >-Original Message- >From: Libo Chen [mailto:libo.c...@huawei.com] >Sent: Thursday, May 09, 2013 4:27 PM >To: Zhang, Sonic; w...@the-dreams.de >Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; >linux- >i...@vger.kernel.org; lize...@huawei.com; Libo Chen >Subject: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init >successful > >down out_error_no_irq. When platform_get_irq fail, no need to free peripheral > >Signed-off-by: Libo Chen >--- > drivers/i2c/busses/i2c-bfin-twi.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/drivers/i2c/busses/i2c-bfin-twi.c >b/drivers/i2c/busses/i2c-bfin-twi.c >index 05080c4..6617645 100644 >--- a/drivers/i2c/busses/i2c-bfin-twi.c >+++ b/drivers/i2c/busses/i2c-bfin-twi.c >@@ -709,9 +709,9 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) > out_error_add_adapter: > free_irq(iface->irq, iface); > out_error_req_irq: >-out_error_no_irq: > peripheral_free_list((unsigned short *)pdev->dev.platform_data); > out_error_pin_mux: >+out_error_no_irq: > iounmap(iface->regs_base); > out_error_ioremap: > out_error_get_res: >-- >1.7.1 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful
Acked-by: Sonic Zhang sonic.zh...@analog.com -Original Message- From: Libo Chen [mailto:libo.c...@huawei.com] Sent: Thursday, May 09, 2013 4:27 PM To: Zhang, Sonic; w...@the-dreams.de Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; linux- i...@vger.kernel.org; lize...@huawei.com; Libo Chen Subject: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful down out_error_no_irq. When platform_get_irq fail, no need to free peripheral Signed-off-by: Libo Chen libo.c...@huawei.com --- drivers/i2c/busses/i2c-bfin-twi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 05080c4..6617645 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -709,9 +709,9 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) out_error_add_adapter: free_irq(iface-irq, iface); out_error_req_irq: -out_error_no_irq: peripheral_free_list((unsigned short *)pdev-dev.platform_data); out_error_pin_mux: +out_error_no_irq: iounmap(iface-regs_base); out_error_ioremap: out_error_get_res: -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful
Hi Libo, -Original Message- From: Libo Chen [mailto:libo.c...@huawei.com] Sent: Thursday, May 09, 2013 4:27 PM To: Zhang, Sonic; w...@the-dreams.de Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; linux- i...@vger.kernel.org; lize...@huawei.com; Libo Chen Subject: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful down out_error_no_irq. When platform_get_irq fail, no need to free peripheral Signed-off-by: Libo Chen libo.c...@huawei.com --- drivers/i2c/busses/i2c-bfin-twi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 05080c4..6617645 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -709,9 +709,9 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) out_error_add_adapter: free_irq(iface-irq, iface); out_error_req_irq: -out_error_no_irq: peripheral_free_list((unsigned short *)pdev-dev.platform_data); out_error_pin_mux: +out_error_no_irq: iounmap(iface-regs_base); out_error_ioremap: out_error_get_res: -- Sorry, but you didn't exchange as I suggested. Should be out_error_req_irq: -out_error_no_irq: +out_error_pin_mux: peripheral_free_list((unsigned short *)pdev-dev.platform_data); -out_error_pin_mux: +out_error_no_irq: Regards, Sonic -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful
Please ignore my Ack. Sonic -Original Message- From: Zhang, Sonic Sent: Thursday, May 09, 2013 4:31 PM To: 'Libo Chen'; w...@the-dreams.de Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; linux- i...@vger.kernel.org; lize...@huawei.com Subject: RE: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful Acked-by: Sonic Zhang sonic.zh...@analog.com -Original Message- From: Libo Chen [mailto:libo.c...@huawei.com] Sent: Thursday, May 09, 2013 4:27 PM To: Zhang, Sonic; w...@the-dreams.de Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; linux- i...@vger.kernel.org; lize...@huawei.com; Libo Chen Subject: [PATCH v2 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it init successful down out_error_no_irq. When platform_get_irq fail, no need to free peripheral Signed-off-by: Libo Chen libo.c...@huawei.com --- drivers/i2c/busses/i2c-bfin-twi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 05080c4..6617645 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -709,9 +709,9 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) out_error_add_adapter: free_irq(iface-irq, iface); out_error_req_irq: -out_error_no_irq: peripheral_free_list((unsigned short *)pdev-dev.platform_data); out_error_pin_mux: +out_error_no_irq: iounmap(iface-regs_base); out_error_ioremap: out_error_get_res: -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [uclinux-dist-devel] [PATCH 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it`s init successful
Hi Libo, >-Original Message- >From: uclinux-dist-devel-boun...@blackfin.uclinux.org >[mailto:uclinux-dist-devel- >boun...@blackfin.uclinux.org] On Behalf Of Libo Chen >Sent: Monday, May 06, 2013 9:11 PM >To: w...@the-dreams.de >Cc: uclinux-dist-de...@blackfin.uclinux.org; Li Zefan; >linux-...@vger.kernel.org; >linux-kernel@vger.kernel.org >Subject: [uclinux-dist-devel] [PATCH 1/2] i2c: i2c-bfin-twi: don`t free >peripheral >before it`s init successful > > >down out_error_no_irq. When platform_get_irq fail, no need to free peripheral > >Signed-off-by: Libo Chen >--- > drivers/i2c/busses/i2c-bfin-twi.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/drivers/i2c/busses/i2c-bfin-twi.c >b/drivers/i2c/busses/i2c-bfin-twi.c >index 05080c4..d38e05a 100644 >--- a/drivers/i2c/busses/i2c-bfin-twi.c >+++ b/drivers/i2c/busses/i2c-bfin-twi.c >@@ -709,8 +709,8 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) > out_error_add_adapter: > free_irq(iface->irq, iface); > out_error_req_irq: >-out_error_no_irq: > peripheral_free_list((unsigned short *)pdev->dev.platform_data); >+out_error_no_irq: > out_error_pin_mux: > iounmap(iface->regs_base); > out_error_ioremap: You should exchange line out_error_no_irq: and line out_error_pin_mux: other than. Could you send me a new patch? Regards, Sonic -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [uclinux-dist-devel] [PATCH 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it`s init successful
Hi Libo, -Original Message- From: uclinux-dist-devel-boun...@blackfin.uclinux.org [mailto:uclinux-dist-devel- boun...@blackfin.uclinux.org] On Behalf Of Libo Chen Sent: Monday, May 06, 2013 9:11 PM To: w...@the-dreams.de Cc: uclinux-dist-de...@blackfin.uclinux.org; Li Zefan; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: [uclinux-dist-devel] [PATCH 1/2] i2c: i2c-bfin-twi: don`t free peripheral before it`s init successful down out_error_no_irq. When platform_get_irq fail, no need to free peripheral Signed-off-by: Libo Chen libo.c...@huawei.com --- drivers/i2c/busses/i2c-bfin-twi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 05080c4..d38e05a 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -709,8 +709,8 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) out_error_add_adapter: free_irq(iface-irq, iface); out_error_req_irq: -out_error_no_irq: peripheral_free_list((unsigned short *)pdev-dev.platform_data); +out_error_no_irq: out_error_pin_mux: iounmap(iface-regs_base); out_error_ioremap: You should exchange line out_error_no_irq: and line out_error_pin_mux: other than. Could you send me a new patch? Regards, Sonic -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: Missing WIDE_BUS_[48] (was: Re: mmc: bfin_sdh: Add support for new RSI controller in bf60x)
Hi Geert, >-Original Message- >From: geert.uytterhoe...@gmail.com [mailto:geert.uytterhoe...@gmail.com] On >Behalf Of Geert Uytterhoeven >Sent: Wednesday, March 20, 2013 5:39 PM >To: Zhang, Sonic; Chris Ball >Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org >Subject: Missing WIDE_BUS_[48] (was: Re: mmc: bfin_sdh: Add support for new >RSI controller in bf60x) > >On Wed, Oct 10, 2012 at 4:28 AM, Linux Kernel Mailing List ker...@vger.kernel.org> wrote: >> Gitweb: >http://git.kernel.org/linus/;a=commit;h=4ffdcf0469f1e7e47476ee410e8dfbc6aba61b >65 >> Commit: 4ffdcf0469f1e7e47476ee410e8dfbc6aba61b65 >> Parent: 0462566b1e3129b2920b63b62a653b70a1bc36fa >> Author: Sonic Zhang >> AuthorDate: Wed Aug 8 00:13:32 2012 -0400 >> Committer: Chris Ball >> CommitDate: Tue Sep 4 13:58:18 2012 -0400 >> >> mmc: bfin_sdh: Add support for new RSI controller in bf60x > >> + clk_ctl |= WIDE_BUS_4; > >Any plans to introduce this "WIDE_BUS_4", and the corresponding >"WIDE_BUS_8" >symbols in mainline? > Bob forgot to push the patch against the head file to the blackfin arch tree in last merge window. It will be done in next merge window. Thanks Sonic N�r��yb�X��ǧv�^�){.n�+{zX����ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a��� 0��h���i
RE: [PATCH] blackfin: twi: Remove bogus #endif
Acked-by: Sonic Zhang >-Original Message- >From: Geert Uytterhoeven [mailto:ge...@linux-m68k.org] >Sent: Wednesday, March 20, 2013 5:16 PM >To: Zhang, Sonic; Bob Liu >Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; >Geert >Uytterhoeven >Subject: [PATCH] blackfin: twi: Remove bogus #endif > >arch/blackfin/mach-bf538/boards/ezkit.c:768:2: error: #endif without #if > >Introduced by commit cf93feb3a0dee97c7896016a352a3226139fbcf4 ("blackfin: >twi: Move TWI peripheral pin request array to platform data"), which removed >the >#if, but forgot about the #endif. > >Signed-off-by: Geert Uytterhoeven >--- >http://kisskb.ellerman.id.au/kisskb/buildresult/8427477/ > > arch/blackfin/mach-bf538/boards/ezkit.c |1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > >diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach- >bf538/boards/ezkit.c >index a4fce03..755f0dc 100644 >--- a/arch/blackfin/mach-bf538/boards/ezkit.c >+++ b/arch/blackfin/mach-bf538/boards/ezkit.c >@@ -764,7 +764,6 @@ static struct platform_device i2c_bfin_twi1_device = { > .num_resources = ARRAY_SIZE(bfin_twi1_resource), > .resource = bfin_twi1_resource, > }; >-#endif/* CONFIG_BF542 */ > #endif/* CONFIG_I2C_BLACKFIN_TWI */ > > #if defined(CONFIG_KEYBOARD_GPIO) || >defined(CONFIG_KEYBOARD_GPIO_MODULE) >-- >1.7.0.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] blackfin: twi: Remove bogus #endif
Acked-by: Sonic Zhangsonic.zh...@analog.com -Original Message- From: Geert Uytterhoeven [mailto:ge...@linux-m68k.org] Sent: Wednesday, March 20, 2013 5:16 PM To: Zhang, Sonic; Bob Liu Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org; Geert Uytterhoeven Subject: [PATCH] blackfin: twi: Remove bogus #endif arch/blackfin/mach-bf538/boards/ezkit.c:768:2: error: #endif without #if Introduced by commit cf93feb3a0dee97c7896016a352a3226139fbcf4 (blackfin: twi: Move TWI peripheral pin request array to platform data), which removed the #if, but forgot about the #endif. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org --- http://kisskb.ellerman.id.au/kisskb/buildresult/8427477/ arch/blackfin/mach-bf538/boards/ezkit.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach- bf538/boards/ezkit.c index a4fce03..755f0dc 100644 --- a/arch/blackfin/mach-bf538/boards/ezkit.c +++ b/arch/blackfin/mach-bf538/boards/ezkit.c @@ -764,7 +764,6 @@ static struct platform_device i2c_bfin_twi1_device = { .num_resources = ARRAY_SIZE(bfin_twi1_resource), .resource = bfin_twi1_resource, }; -#endif/* CONFIG_BF542 */ #endif/* CONFIG_I2C_BLACKFIN_TWI */ #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: Missing WIDE_BUS_[48] (was: Re: mmc: bfin_sdh: Add support for new RSI controller in bf60x)
Hi Geert, -Original Message- From: geert.uytterhoe...@gmail.com [mailto:geert.uytterhoe...@gmail.com] On Behalf Of Geert Uytterhoeven Sent: Wednesday, March 20, 2013 5:39 PM To: Zhang, Sonic; Chris Ball Cc: uclinux-dist-de...@blackfin.uclinux.org; linux-kernel@vger.kernel.org Subject: Missing WIDE_BUS_[48] (was: Re: mmc: bfin_sdh: Add support for new RSI controller in bf60x) On Wed, Oct 10, 2012 at 4:28 AM, Linux Kernel Mailing List linux- ker...@vger.kernel.org wrote: Gitweb: http://git.kernel.org/linus/;a=commit;h=4ffdcf0469f1e7e47476ee410e8dfbc6aba61b 65 Commit: 4ffdcf0469f1e7e47476ee410e8dfbc6aba61b65 Parent: 0462566b1e3129b2920b63b62a653b70a1bc36fa Author: Sonic Zhang sonic.zh...@analog.com AuthorDate: Wed Aug 8 00:13:32 2012 -0400 Committer: Chris Ball c...@laptop.org CommitDate: Tue Sep 4 13:58:18 2012 -0400 mmc: bfin_sdh: Add support for new RSI controller in bf60x + clk_ctl |= WIDE_BUS_4; Any plans to introduce this WIDE_BUS_4, and the corresponding WIDE_BUS_8 symbols in mainline? Bob forgot to push the patch against the head file to the blackfin arch tree in last merge window. It will be done in next merge window. Thanks Sonic N�r��yb�X��ǧv�^�){.n�+{zX����ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf��^jǫy�m��@A�a��� 0��h���i
RE: [PATCH 2/7] i2c-bfin-twi: Use struct dev_pm_ops for power management
Acked-by: Sonic Zhang >-Original Message- >From: Rafael J. Wysocki [mailto:r...@sisk.pl] >Sent: Thursday, July 12, 2012 3:24 AM >To: LKML >Cc: Linux PM list; Linus Walleij; linux-...@vger.kernel.org; Zhang, Sonic; Jean >Delvare; Ben Dooks; Wolfram Sang; Peter Korsgaard; Guan Xuetao; Vitaly Wool; >Colin Cross; Stephen Warren >Subject: [PATCH 2/7] i2c-bfin-twi: Use struct dev_pm_ops for power management > >From: Rafael J. Wysocki > >Make the Blackfin On-Chip Two Wire Interface driver define its PM >callbacks through a struct dev_pm_ops object rather than by using >legacy PM hooks in struct platform_driver. > >Signed-off-by: Rafael J. Wysocki >--- > drivers/i2c/busses/i2c-bfin-twi.c | 18 ++ > 1 file changed, 10 insertions(+), 8 deletions(-) > >Index: linux/drivers/i2c/busses/i2c-bfin-twi.c >= >== >--- linux.orig/drivers/i2c/busses/i2c-bfin-twi.c >+++ linux/drivers/i2c/busses/i2c-bfin-twi.c >@@ -611,9 +611,9 @@ static struct i2c_algorithm bfin_twi_alg > .functionality = bfin_twi_functionality, > }; > >-static int i2c_bfin_twi_suspend(struct platform_device *pdev, pm_message_t >state) >+static int i2c_bfin_twi_suspend(struct device *dev) > { >- struct bfin_twi_iface *iface = platform_get_drvdata(pdev); >+ struct bfin_twi_iface *iface = dev_get_drvdata(dev); > > iface->saved_clkdiv = read_CLKDIV(iface); > iface->saved_control = read_CONTROL(iface); >@@ -626,14 +626,14 @@ static int i2c_bfin_twi_suspend(struct p > return 0; > } > >-static int i2c_bfin_twi_resume(struct platform_device *pdev) >+static int i2c_bfin_twi_resume(struct device *dev) > { >- struct bfin_twi_iface *iface = platform_get_drvdata(pdev); >+ struct bfin_twi_iface *iface = dev_get_drvdata(dev); > > int rc = request_irq(iface->irq, bfin_twi_interrupt_entry, >- 0, pdev->name, iface); >+ 0, to_platform_device(dev)->name, iface); > if (rc) { >- dev_err(>dev, "Can't get IRQ %d !\n", iface->irq); >+ dev_err(dev, "Can't get IRQ %d !\n", iface->irq); > return -ENODEV; > } > >@@ -646,6 +646,9 @@ static int i2c_bfin_twi_resume(struct pl > return 0; > } > >+static SIMPLE_DEV_PM_OPS(i2c_bfin_twi_pm, >+ i2c_bfin_twi_suspend, i2c_bfin_twi_resume); >+ > static int i2c_bfin_twi_probe(struct platform_device *pdev) > { > struct bfin_twi_iface *iface; >@@ -770,11 +773,10 @@ static int i2c_bfin_twi_remove(struct pl > static struct platform_driver i2c_bfin_twi_driver = { > .probe = i2c_bfin_twi_probe, > .remove = i2c_bfin_twi_remove, >- .suspend= i2c_bfin_twi_suspend, >- .resume = i2c_bfin_twi_resume, > .driver = { > .name = "i2c-bfin-twi", > .owner = THIS_MODULE, >+ .pm = _bfin_twi_pm, > }, > }; > > N�r��yb�X��ǧv�^�){.n�+{zX����ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a��� 0��h���i
RE: [PATCH 2/7] i2c-bfin-twi: Use struct dev_pm_ops for power management
Acked-by: Sonic Zhang sonic.zh...@analog.com -Original Message- From: Rafael J. Wysocki [mailto:r...@sisk.pl] Sent: Thursday, July 12, 2012 3:24 AM To: LKML Cc: Linux PM list; Linus Walleij; linux-...@vger.kernel.org; Zhang, Sonic; Jean Delvare; Ben Dooks; Wolfram Sang; Peter Korsgaard; Guan Xuetao; Vitaly Wool; Colin Cross; Stephen Warren Subject: [PATCH 2/7] i2c-bfin-twi: Use struct dev_pm_ops for power management From: Rafael J. Wysocki r...@sisk.pl Make the Blackfin On-Chip Two Wire Interface driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki r...@sisk.pl --- drivers/i2c/busses/i2c-bfin-twi.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) Index: linux/drivers/i2c/busses/i2c-bfin-twi.c = == --- linux.orig/drivers/i2c/busses/i2c-bfin-twi.c +++ linux/drivers/i2c/busses/i2c-bfin-twi.c @@ -611,9 +611,9 @@ static struct i2c_algorithm bfin_twi_alg .functionality = bfin_twi_functionality, }; -static int i2c_bfin_twi_suspend(struct platform_device *pdev, pm_message_t state) +static int i2c_bfin_twi_suspend(struct device *dev) { - struct bfin_twi_iface *iface = platform_get_drvdata(pdev); + struct bfin_twi_iface *iface = dev_get_drvdata(dev); iface-saved_clkdiv = read_CLKDIV(iface); iface-saved_control = read_CONTROL(iface); @@ -626,14 +626,14 @@ static int i2c_bfin_twi_suspend(struct p return 0; } -static int i2c_bfin_twi_resume(struct platform_device *pdev) +static int i2c_bfin_twi_resume(struct device *dev) { - struct bfin_twi_iface *iface = platform_get_drvdata(pdev); + struct bfin_twi_iface *iface = dev_get_drvdata(dev); int rc = request_irq(iface-irq, bfin_twi_interrupt_entry, - 0, pdev-name, iface); + 0, to_platform_device(dev)-name, iface); if (rc) { - dev_err(pdev-dev, Can't get IRQ %d !\n, iface-irq); + dev_err(dev, Can't get IRQ %d !\n, iface-irq); return -ENODEV; } @@ -646,6 +646,9 @@ static int i2c_bfin_twi_resume(struct pl return 0; } +static SIMPLE_DEV_PM_OPS(i2c_bfin_twi_pm, + i2c_bfin_twi_suspend, i2c_bfin_twi_resume); + static int i2c_bfin_twi_probe(struct platform_device *pdev) { struct bfin_twi_iface *iface; @@ -770,11 +773,10 @@ static int i2c_bfin_twi_remove(struct pl static struct platform_driver i2c_bfin_twi_driver = { .probe = i2c_bfin_twi_probe, .remove = i2c_bfin_twi_remove, - .suspend= i2c_bfin_twi_suspend, - .resume = i2c_bfin_twi_resume, .driver = { .name = i2c-bfin-twi, .owner = THIS_MODULE, + .pm = i2c_bfin_twi_pm, }, }; N�r��yb�X��ǧv�^�){.n�+{zX����ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf��^jǫy�m��@A�a��� 0��h���i