All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jingoo Han <jg1.han@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	"'Thomas Petazzoni'" <thomas.petazzoni@free-electrons.com>,
	"'Jason Gunthorpe'" <jgunthorpe@obsidianresearch.com>,
	linux-samsung-soc@vger.kernel.org,
	"'Siva Reddy Kallam'" <siva.kallam@samsung.com>,
	"'Surendranath Gurivireddy Balla'" <suren.reddy@samsung.com>,
	linux-pci@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	"'Thierry Reding'" <thierry.reding@avionic-design.de>,
	linux-kernel@vger.kernel.org,
	"'Grant Likely'" <grant.likely@secretlab.ca>,
	"'Kukjin Kim'" <kgene.kim@samsung.com>,
	"'Thomas Abraham'" <thomas.abraham@linaro.org>,
	"'Bjorn Helgaas'" <bhelgaas@google.com>,
	"'Andrew Murray'" <andrew.murray@arm.com>
Subject: Re: [PATCH V5 1/3] pci: Add PCIe driver for Samsung Exynos
Date: Wed, 19 Jun 2013 14:43:09 +0200	[thread overview]
Message-ID: <201306191443.09598.arnd@arndb.de> (raw)
In-Reply-To: <002401ce6c8a$2dd1e4a0$8975ade0$@samsung.com>

On Wednesday 19 June 2013, Jingoo Han wrote:
> Then, do you mean the following?
> 
> static int __exit exynos_pcie_remove(struct platform_device *pdev)
> {
>         struct pcie_port *pp = platform_get_drvdata(pdev);
> 
>         clk_disable_unprepare(pp->bus_clk);
>         clk_disable_unprepare(pp->clk);
> 
>         return 0;
> }
> 
> static struct platform_driver exynos_pcie_driver = {
>         .remove = __exit_p(exynos_pcie_remove),
> 
> [.....]
> 
> /* Exynos PCIe driver does not allow module unload */
> 
> static int __init pcie_init(void)
> {
>         hook_fault_code(16 + 6, exynos_pcie_abort, SIGBUS, 0,
>                         "imprecise external abort");
> 
>         platform_driver_probe(&exynos_pcie_driver, exynos_pcie_probe);
> 
>         return 0;
> }
> subsys_initcall(pcie_init);
> 
> MODULE_AUTHOR("Jingoo Han <jg1.han@samsung.com>");
> MODULE_DESCRIPTION("Samsung PCIe host controller driver");
> MODULE_LICENSE("GPLv2");
> 

Yes, this looks good. I would probably use platform_driver_register
rather than platform_driver_probe, but that is your choice. using
platform_driver_probe() mean you cannot deal with deferred probing.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V5 1/3] pci: Add PCIe driver for Samsung Exynos
Date: Wed, 19 Jun 2013 14:43:09 +0200	[thread overview]
Message-ID: <201306191443.09598.arnd@arndb.de> (raw)
In-Reply-To: <002401ce6c8a$2dd1e4a0$8975ade0$@samsung.com>

On Wednesday 19 June 2013, Jingoo Han wrote:
> Then, do you mean the following?
> 
> static int __exit exynos_pcie_remove(struct platform_device *pdev)
> {
>         struct pcie_port *pp = platform_get_drvdata(pdev);
> 
>         clk_disable_unprepare(pp->bus_clk);
>         clk_disable_unprepare(pp->clk);
> 
>         return 0;
> }
> 
> static struct platform_driver exynos_pcie_driver = {
>         .remove = __exit_p(exynos_pcie_remove),
> 
> [.....]
> 
> /* Exynos PCIe driver does not allow module unload */
> 
> static int __init pcie_init(void)
> {
>         hook_fault_code(16 + 6, exynos_pcie_abort, SIGBUS, 0,
>                         "imprecise external abort");
> 
>         platform_driver_probe(&exynos_pcie_driver, exynos_pcie_probe);
> 
>         return 0;
> }
> subsys_initcall(pcie_init);
> 
> MODULE_AUTHOR("Jingoo Han <jg1.han@samsung.com>");
> MODULE_DESCRIPTION("Samsung PCIe host controller driver");
> MODULE_LICENSE("GPLv2");
> 

Yes, this looks good. I would probably use platform_driver_register
rather than platform_driver_probe, but that is your choice. using
platform_driver_probe() mean you cannot deal with deferred probing.

	Arnd

  reply	other threads:[~2013-06-19 12:43 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13 13:22 [PATCH V5 1/3] pci: Add PCIe driver for Samsung Exynos Jingoo Han
2013-06-13 13:22 ` Jingoo Han
2013-06-13 13:22 ` Jingoo Han
2013-06-13 14:13 ` Arnd Bergmann
2013-06-13 14:13   ` Arnd Bergmann
2013-06-13 14:13   ` Arnd Bergmann
2013-06-14  8:18   ` Jingoo Han
2013-06-14  8:18     ` Jingoo Han
2013-06-14 10:53     ` Thierry Reding
2013-06-14 10:53       ` Thierry Reding
2013-06-14 12:38       ` Arnd Bergmann
2013-06-14 12:38         ` Arnd Bergmann
2013-07-17  5:07         ` Thierry Reding
2013-07-17  5:07           ` Thierry Reding
2013-06-14 12:53     ` Arnd Bergmann
2013-06-14 12:53       ` Arnd Bergmann
2013-06-14 12:53       ` Arnd Bergmann
2013-06-17  9:45       ` Jingoo Han
2013-06-17  9:45         ` Jingoo Han
2013-06-17 12:44         ` Arnd Bergmann
2013-06-17 12:44           ` Arnd Bergmann
2013-06-18  3:52           ` Jingoo Han
2013-06-18  3:52             ` Jingoo Han
2013-06-18 13:56             ` Arnd Bergmann
2013-06-18 13:56               ` Arnd Bergmann
2013-06-18 13:56               ` Arnd Bergmann
2013-06-19  1:13               ` Jingoo Han
2013-06-19  1:13                 ` Jingoo Han
2013-06-19 12:43                 ` Arnd Bergmann [this message]
2013-06-19 12:43                   ` Arnd Bergmann
2013-06-20  6:41                   ` Jingoo Han
2013-06-20  6:41                     ` Jingoo Han
2013-06-18  5:35           ` Jingoo Han
2013-06-18  5:35             ` Jingoo Han

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201306191443.09598.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=andrew.murray@arm.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=jg1.han@samsung.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=siva.kallam@samsung.com \
    --cc=suren.reddy@samsung.com \
    --cc=thierry.reding@avionic-design.de \
    --cc=thomas.abraham@linaro.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.