s. But if this looks OK to you I'll add it.
[...]
Thank you Bjorn and Heiner!
Reviewed-by: Krzysztof Wilczyński
Krzysztof
pci_dev_flags_t.
This will keep PCI device-specific features as part of the struct
pci_dev and make the code that used to use flags simpler.
Suggested-by: Bjorn Helgaas
Signed-off-by: Krzysztof Wilczyński
Acked-by: Martin Habets
---
Changes in v2:
Added missing "PCI" prefix to t
Hello Bjorn,
Sincere apologies! I forgot to include the "PCI" prefix in the subject.
Would you like me to send the patch again?
Krzysztof
pci_dev_flags_t.
This will keep PCI device-specific features as part of the struct
pci_dev and make the code that used to use flags simpler.
Suggested-by: Bjorn Helgaas
Signed-off-by: Krzysztof Wilczyński
---
drivers/net/ethernet/atheros/alx/main.c | 2 +-
drivers/net/ethernet/sfc/ef10_sriov.c
is no change to the functionality.
Signed-off-by: Krzysztof Wilczyński
---
Documentation/power/pci.rst | 2 +-
arch/x86/pci/fixup.c | 2 +-
arch/x86/pci/intel_mid_pci.c | 2 +-
drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +-
Hello Greg,
[...]
> It's "interesting" how using your new helper doesn't actually make the
> code smaller. Perhaps it isn't a good helper function?
The idea for the helper was inspired by the comment Dan made to Bjorn
about Bjorn's change, as per:
https://lore.kernel.org/driverdev-devel/20191
Hello Alex and Greg,
[...]
> This could just be:
>
> if (drv)
> return drv->pm;
>
> return NULL;
>
> Or if you want to evoke passion in Greg:
>
> return drv ? drv->pm : NULL;
>
> -Alex
>
> > I hate ? : lines with a passion
Hi Ursula,
On 20-05-26 09:07:27, Ursula Braun wrote:
>
>
> On 5/25/20 8:26 PM, Krzysztof Wilczyński wrote:
> > Use the new device_to_pm() helper to access Power Management callbacs
> > (struct dev_pm_ops) for a particular device (struct device_driver).
> >
> &
const struct dev_pm_ops *pm = driver_to_pm(dev->driver);
if (pm && pm->prepare) {
int ret = pm->prepare(dev);
Or, changing the following:
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
To:
const struct dev_pm_ops *pm = drive
Use the new device_to_pm() helper to access Power Management callbacs
(struct dev_pm_ops) for a particular device (struct device_driver).
No functional change intended.
Signed-off-by: Krzysztof Wilczyński
---
drivers/pci/pci-driver.c | 32
1 file changed, 16
Use the new device_to_pm() helper to access Power Management callbacs
(struct dev_pm_ops) for a particular device (struct device_driver).
No functional change intended.
Signed-off-by: Krzysztof Wilczyński
---
drivers/acpi/device_pm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions
Use the new device_to_pm() helper to access Power Management callbacs
(struct dev_pm_ops) for a particular device (struct device_driver).
No functional change intended.
Signed-off-by: Krzysztof Wilczyński
---
drivers/usb/phy/phy-fsl-usb.c | 11 +++
1 file changed, 7 insertions(+), 4
Use the new device_to_pm() helper to access Power Management callbacs
(struct dev_pm_ops) for a particular device (struct device_driver).
No functional change intended.
Signed-off-by: Krzysztof Wilczyński
---
net/iucv/iucv.c | 30 ++
1 file changed, 18 insertions
stent").
Links:
https://lore.kernel.org/driverdev-devel/20191014230016.240912-6-helg...@kernel.org/
https://lore.kernel.org/driverdev-devel/8592302.r4xC6RIy69@kreacher/
https://lore.kernel.org/driverdev-devel/20191016135002.GA24678@kadam/
Signed-off-by: Krzysztof Wilczyński
---
drivers/
nded.
Links:
https://lore.kernel.org/driverdev-devel/20191014230016.240912-6-helg...@kernel.org/
https://lore.kernel.org/driverdev-devel/8592302.r4xC6RIy69@kreacher/
https://lore.kernel.org/driverdev-devel/20191016135002.GA24678@kadam/
Krzysztof Wilczyński (8):
driver core: Add helper for
Use the new device_to_pm() helper to access Power Management callbacs
(struct dev_pm_ops) for a particular device (struct device_driver).
No functional change intended.
Signed-off-by: Krzysztof Wilczyński
---
drivers/scsi/scsi_pm.c | 8
1 file changed, 4 insertions(+), 4 deletions
Use the new device_to_pm() helper to access Power Management callbacs
(struct dev_pm_ops) for a particular device (struct device_driver).
No functional change intended.
Signed-off-by: Krzysztof Wilczyński
---
drivers/greybus/bundle.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
17 matches
Mail list logo