lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201209270741.54443.arnd@arndb.de>
Date:	Thu, 27 Sep 2012 07:41:53 +0000
From:	Arnd Bergmann <arnd@...db.de>
To:	viresh kumar <viresh.kumar@...aro.org>
Cc:	Andy Shevchenko <andy.shevchenko@...il.com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Vinod Koul <vinod.koul@...el.com>,
	linux-kernel@...r.kernel.org,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	"spear-devel" <spear-devel@...t.st.com>
Subject: Re: [PATCHv2 2/4] dmaengine: dw_dmac: Add PCI part of the driver

On Thursday 27 September 2012, viresh kumar wrote:
> I believe there is no common initialization part here, because PCI device in any
> case would be calling probe of platform device. :)

Looking at the driver more closely now. Right now, it only supports platform 
devices, and the dw_probe function contains some parts that are related to
platform devices and some parts that are needed also in case of PCI.

My suggestion would be that you split the dw_probe function to separate out
the bus specific parts and end up with three functions like

int dw_dmac_probe(struct dw_dma *dw);
int dw_dmac_platform_probe(struct platform_device *pdev);
int dw_dmac_pci_probe(struct dw_dma *dw);

where the first one is called by the other two, depending on the bus type.
This could be done either splitting the driver into multiple files so you can
have the platform and pci parts in separate driver modules depending on the
common module that does all the actual work, or everything can be put in
a single file with an #ifdef CONFIG_PCI to disable the pci driver parts
when they don't apply.

Does this make sense?

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ