Re: Fix few remaining u32 vs. pm_message_t issues

From: Pavel Machek (pavel_at_suse.cz)
Date: 02/28/05

  • Next message: Chris Wright: "Re: [CAN-2005-0204]: AMD64, allows local users to write to privileged IO ports via OUTS instruction"
    Date:	Mon, 28 Feb 2005 23:19:04 +0100
    To: Greg KH <greg@kroah.com>
    
    

    Hi!

    > > -mm is pretty good in u32 vs. pm_message_t area, there are only few
    > > -places missing. Some of them are in usb (and already on their way
    > > -through greg), this should fix the rest. Only code change is
    > > -pci_choose_state in savagefb. Please apply,
    >
    > If you split out the drivers/base/* and the drivers/pci/* ones I'll add
    > those to my trees too.

    Okay, here they are:

    Thanks,
                                                                    Pavel

    --- clean-mm/drivers/base/power/runtime.c 2005-01-12 11:07:39.000000000 +0100
    +++ linux-mm/drivers/base/power/runtime.c 2005-02-28 21:05:15.000000000 +0100
    @@ -16,7 +16,7 @@
             if (!dev->power.power_state)
                     return;
             if (!resume_device(dev))
    - dev->power.power_state = 0;
    + dev->power.power_state = PMSG_ON;
     }
     
     
    --- clean-mm/drivers/base/power/sysfs.c 2004-08-15 19:14:55.000000000 +0200
    +++ linux-mm/drivers/base/power/sysfs.c 2005-02-28 21:05:15.000000000 +0100
    @@ -31,7 +31,7 @@
     
     static ssize_t state_store(struct device * dev, const char * buf, size_t n)
     {
    - u32 state;
    + pm_message_t state;
             char * rest;
             int error = 0;
     
    --- clean-mm/drivers/pci/pci.c 2005-02-28 01:13:58.000000000 +0100
    +++ linux-mm/drivers/pci/pci.c 2005-02-28 21:05:55.000000000 +0100
    @@ -312,13 +312,14 @@
     /**
      * pci_choose_state - Choose the power state of a PCI device
      * @dev: PCI device to be suspended
    - * @state: target sleep state for the whole system
    + * @state: target sleep state for the whole system. This is the value
    + * that is passed to suspend() function.
      *
      * Returns PCI power state suitable for given device and given system
      * message.
      */
     
    -pci_power_t pci_choose_state(struct pci_dev *dev, u32 state)
    +pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)
     {
             if (!pci_find_capability(dev, PCI_CAP_ID_PM))
                     return PCI_D0;

    -- 
    People were complaining that M$ turns users into beta-testers...
    ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Chris Wright: "Re: [CAN-2005-0204]: AMD64, allows local users to write to privileged IO ports via OUTS instruction"

    Relevant Pages

    • pm_message_t to struct conversion [was Re: 2.6.12-rc1-mm1: Kernel BUG at pci:389]
      ... static ssize_t state_show(struct device * dev, ... target sleep state for the whole system ... +typedef struct pm_message { ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • [patch 2.6.13-rc1] pci: cleanup argument comments for pci_{save,restore}_state
      ... pci_save_state(struct pci_dev *dev) ... pci_restore_state - Restore the saved state of a PCI device ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: fix-u32-vs-pm_message_t-in-usb
      ... Print error when some ... target sleep state for the whole system ... * Returns PCI power state suitable for given device and given system ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Cleanup PCI power states
      ... * pci_choose_state - Choose the power state of a PCI device ... * @dev: ... * @buffer: - buffer to hold config space context ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [Bug] invalid mac address after rebooting (2.6.12-rc2-mm2)
      ... i already posted a debugging patch and asked to have to dmesg output. ... * @dev: PCI device to be suspended ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)