driver model: more pm_message_t conversion
Subsystems (11)
Hi!
This fixes few more types, mostly switching u32s into pm_message_ts. It does not actually change any code. With this plus few small patches, I can actually switch pm_message_t to struct and still have it compile/work on my system. Please apply,
Pavel
Documentation/power/devices.txt +1 -1
@@ -15,7 +15,7 @@ struct bus_type { ... - int (*suspend)(struct device * dev, u32 state); + int (*suspend)(struct device * dev, pm_message_t state); int (*resume)(struct device * dev); };
drivers/char/agp/via-agp.c +3 -3
@@ -440,10 +440,10 @@#ifdef CONFIG_PM -static int agp_via_suspend (struct pci_dev *pdev,u32 state) +static int agp_via_suspend (struct pci_dev *pdev,pm_message_t state) {pci_save_state (pdev); -pci_set_power_state (pdev,3 ); +pci_set_power_state (pdev, PCI_D3hot);return 0 ; }
@@ -452,7 +452,7 @@ {struct agp_bridge_data *bridge =pci_get_drvdata (pdev); -pci_set_power_state (pdev,0 ); +pci_set_power_state (pdev,PCI_D0 );pci_restore_state (pdev);if (bridge->driver == &via_agp3_driver)
drivers/i2c/i2c-core.c +1 -1
@@ -530,7 +530,7 @@return 1 ; } -static int i2c_bus_suspend (struct device * dev,u32 state) +static int i2c_bus_suspend (struct device * dev,pm_message_t state) {int rc =0 ;
drivers/ide/ide-disk.c +1 -1
@@ -1157,7 +1157,7 @@ }printk ("Shutdown: %s\n" , drive->name); - dev->bus->suspend (dev,PM_SUSPEND_STANDBY ); + dev->bus->suspend (dev,PMSG_SUSPEND ); }/*
drivers/ieee1394/ohci1394.c +1 -1
@@ -3510,7 +3510,7 @@ } -static int ohci1394_pci_suspend (struct pci_dev *pdev,u32 state) +static int ohci1394_pci_suspend (struct pci_dev *pdev,pm_message_t state) {#ifdef CONFIG_PMAC_PBOOK {
drivers/input/serio/i8042.c +1 -1
@@ -860,7 +860,7 @@* Here we try to restore the original BIOS settings */ -static int i8042_suspend (struct device *dev,u32 state,u32 level) +static int i8042_suspend (struct device *dev,pm_message_t state,u32 level) {if (level ==SUSPEND_DISABLE ) {del_timer_sync (&i8042_timer);
drivers/mmc/mmc_block.c +1 -1
@@ -437,7 +437,7 @@ }#ifdef CONFIG_PM -static int mmc_blk_suspend (struct mmc_card *card,u32 state) +static int mmc_blk_suspend (struct mmc_card *card,pm_message_t state) {struct mmc_blk_data *md =mmc_get_drvdata (card);
drivers/mmc/mmc_sysfs.c +1 -1
@@ -74,7 +74,7 @@return 0 ; } -static int mmc_bus_suspend (struct device *dev,u32 state) +static int mmc_bus_suspend (struct device *dev,pm_message_t state) {struct mmc_driver *drv =to_mmc_driver (dev->driver);struct mmc_card *card =dev_to_mmc_card (dev);
drivers/net/8139too.c +1 -1
@@ -2581,7 +2581,7 @@#ifdef CONFIG_PM -static int rtl8139_suspend (struct pci_dev *pdev,u32 state) +static int rtl8139_suspend (struct pci_dev *pdev,pm_message_t state) {struct net_device *dev =pci_get_drvdata (pdev);struct rtl8139_private *tp = dev->priv;
drivers/net/amd8111e.c +1 -1
@@ -1797,7 +1797,7 @@if (!err)netif_wake_queue (dev); } -static int amd8111e_suspend (struct pci_dev *pci_dev,u32 state) +static int amd8111e_suspend (struct pci_dev *pci_dev,pm_message_t state) {struct net_device *dev =pci_get_drvdata (pci_dev);struct amd8111e_priv *lp =netdev_priv (dev);
drivers/net/b44.c +1 -1
@@ -1903,7 +1903,7 @@ } } -static int b44_suspend (struct pci_dev *pdev,u32 state) +static int b44_suspend (struct pci_dev *pdev,pm_message_t state) {struct net_device *dev =pci_get_drvdata (pdev);struct b44 *bp =netdev_priv (dev);
drivers/net/eepro100.c +3 -3
@@ -2281,7 +2281,7 @@ }#ifdef CONFIG_PM -static int eepro100_suspend (struct pci_dev *pdev,u32 state) +static int eepro100_suspend (struct pci_dev *pdev,pm_message_t state) {struct net_device *dev =pci_get_drvdata (pdev);struct speedo_private *sp =netdev_priv (dev);
@@ -2299,7 +2299,7 @@/* XXX call pci_set_power_state ()? */ pci_disable_device (pdev); -pci_set_power_state (pdev,3 ); +pci_set_power_state (pdev, PCI_D3hot);return 0 ; }
@@ -2309,7 +2309,7 @@struct speedo_private *sp =netdev_priv (dev);void __iomem *ioaddr = sp->regs; -pci_set_power_state (pdev,0 ); +pci_set_power_state (pdev,PCI_D0 );pci_restore_state (pdev);pci_enable_device (pdev);pci_set_master (pdev);
drivers/net/irda/donauboe.c +1 -1
@@ -1712,7 +1712,7 @@ }static int -toshoboe_gotosleep (struct pci_dev *pci_dev,u32 crap) +toshoboe_gotosleep (struct pci_dev *pci_dev,pm_message_t crap) {struct toshoboe_cb *self = (struct toshoboe_cb *)pci_get_drvdata (pci_dev);unsigned long flags;
drivers/net/tg3.c +1 -1
@@ -8448,7 +8448,7 @@ } } -static int tg3_suspend (struct pci_dev *pdev,u32 state) +static int tg3_suspend (struct pci_dev *pdev,pm_message_t state) {struct net_device *dev =pci_get_drvdata (pdev);struct tg3 *tp =netdev_priv (dev);
drivers/net/tulip/tulip_core.c +1 -1
@@ -1749,7 +1749,7 @@#ifdef CONFIG_PM -static int tulip_suspend (struct pci_dev *pdev,u32 state) +static int tulip_suspend (struct pci_dev *pdev,pm_message_t state) {struct net_device *dev =pci_get_drvdata (pdev);
drivers/net/via-rhine.c +1 -1
@@ -1937,7 +1937,7 @@ }#ifdef CONFIG_PM -static int rhine_suspend (struct pci_dev *pdev,u32 state) +static int rhine_suspend (struct pci_dev *pdev,pm_message_t state) {struct net_device *dev =pci_get_drvdata (pdev);struct rhine_private *rp =netdev_priv (dev);
drivers/pci/pci.c +1 -1
@@ -318,7 +318,7 @@* 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 ;
drivers/pcmcia/cs.c +1 -1
@@ -140,7 +140,7 @@static int socket_resume (struct pcmcia_socket *skt);static int socket_suspend (struct pcmcia_socket *skt); -int pcmcia_socket_dev_suspend (struct device *dev,u32 state) +int pcmcia_socket_dev_suspend (struct device *dev,pm_message_t state) {struct pcmcia_socket *socket;
drivers/pcmcia/i82092.c +1 -1
@@ -42,7 +42,7 @@ };MODULE_DEVICE_TABLE (pci, i82092aa_pci_ids); -static int i82092aa_socket_suspend (struct pci_dev *dev,u32 state) +static int i82092aa_socket_suspend (struct pci_dev *dev,pm_message_t state) {return pcmcia_socket_dev_suspend (&dev->dev, state); }
drivers/pcmcia/i82365.c +1 -1
@@ -1338,7 +1338,7 @@/*====================================================================*/ -static int i82365_suspend (struct device *dev,u32 state,u32 level) +static int i82365_suspend (struct device *dev,pm_message_t state,u32 level) {int ret =0 ;if (level ==SUSPEND_SAVE_STATE )
drivers/pcmcia/tcic.c +1 -1
@@ -369,7 +369,7 @@/*====================================================================*/ -static int tcic_drv_suspend (struct device *dev,u32 state,u32 level) +static int tcic_drv_suspend (struct device *dev,pm_message_t state,u32 level) {int ret =0 ;if (level ==SUSPEND_SAVE_STATE )
drivers/pcmcia/yenta_socket.c +1 -1
@@ -1019,7 +1019,7 @@ } -static int yenta_dev_suspend (struct pci_dev *dev,u32 state) +static int yenta_dev_suspend (struct pci_dev *dev,pm_message_t state) {struct yenta_socket *socket =pci_get_drvdata (dev);int ret;
drivers/serial/8250.c +1 -1
@@ -2255,7 +2255,7 @@return 0 ; } -static int serial8250_suspend (struct device *dev,u32 state,u32 level) +static int serial8250_suspend (struct device *dev,pm_message_t state,u32 level) {int i;
drivers/serial/8250_pci.c +1 -1
@@ -1759,7 +1759,7 @@ } } -static int pciserial_suspend_one (struct pci_dev *dev,u32 state) +static int pciserial_suspend_one (struct pci_dev *dev,pm_message_t state) {struct serial_private *priv =pci_get_drvdata (dev);
drivers/usb/core/hcd.h +1 -1
@@ -223,7 +223,7 @@extern void usb_hcd_pci_remove (struct pci_dev *dev);#ifdef CONFIG_PM -extern int usb_hcd_pci_suspend (struct pci_dev *dev,u32 state); +extern int usb_hcd_pci_suspend (struct pci_dev *dev,pm_message_t state);extern int usb_hcd_pci_resume (struct pci_dev *dev);#endif /* CONFIG_PM */
drivers/usb/core/hub.c +2 -2
@@ -1636,7 +1636,7 @@* * Returns 0 on success, else negative errno. */ -int usb_suspend_device (struct usb_device *udev,u32 state) +int usb_suspend_device (struct usb_device *udev,pm_message_t state) {int port1, status;
@@ -1951,7 +1951,7 @@#else /* !CONFIG_USB_SUSPEND */ -int usb_suspend_device (struct usb_device *udev,u32 state) +int usb_suspend_device (struct usb_device *udev,pm_message_t state) {return 0 ; }
drivers/usb/core/usb.c +1 -1
@@ -1348,7 +1348,7 @@ usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); } -static int usb_generic_suspend (struct device *dev,u32 state) +static int usb_generic_suspend (struct device *dev,pm_message_t state) {struct usb_interface *intf;struct usb_driver *driver;
drivers/usb/input/hid-core.c +2 -2
@@ -1850,7 +1850,7 @@return 0 ; } -static int hid_suspend (struct usb_interface *intf,u32 state) +static int hid_suspend (struct usb_interface *intf,pm_message_t state) {struct hid_device *hid =usb_get_intfdata (intf);
@@ -1865,7 +1865,7 @@struct hid_device *hid =usb_get_intfdata (intf);int status; - intf->dev.power.power_state =PM_SUSPEND_ON ; + intf->dev.power.power_state =PMSG_ON ;if (hid->open) status =usb_submit_urb (hid->urbin,GFP_NOIO );else
drivers/video/aty/radeon_pm.c +4 -4
@@ -13,12 +13,12 @@* On PowerMac, we assume any mobility chip based machine does D2 */ #ifdef CONFIG_PPC_PMAC -static inline int radeon_suspend_to_d2 (struct radeonfb_info *rinfo,u32 state) +static inline int radeon_suspend_to_d2 (struct radeonfb_info *rinfo,pm_message_t state) {return rinfo->is_mobility; }#else -static inline int radeon_suspend_to_d2 (struct radeonfb_info *rinfo,u32 state) +static inline int radeon_suspend_to_d2 (struct radeonfb_info *rinfo,pm_message_t state) {return 0 ; }
@@ -850,7 +850,7 @@ } } -int radeonfb_pci_suspend (struct pci_dev *pdev,u32 state) +int radeonfb_pci_suspend (struct pci_dev *pdev,pm_message_t state) {struct fb_info *info =pci_get_drvdata (pdev);struct radeonfb_info *rinfo = info->par;
@@ -935,7 +935,7 @@release_console_sem (); - pdev->dev.power.power_state =0 ; + pdev->dev.power.power_state =PMSG_ON ;printk (KERN_DEBUG "radeonfb: resumed !\n" );
drivers/video/aty/radeonfb.h +1 -1
@@ -526,7 +526,7 @@/* PM Functions */ extern void radeon_pm_disable_dynamic_mode (struct radeonfb_info *rinfo);extern void radeon_pm_enable_dynamic_mode (struct radeonfb_info *rinfo); -extern int radeonfb_pci_suspend (struct pci_dev *pdev,u32 state); +extern int radeonfb_pci_suspend (struct pci_dev *pdev,pm_message_t state);extern int radeonfb_pci_resume (struct pci_dev *pdev);/* Monitor probe functions */
include/linux/device.h +1 -1
@@ -111,7 +111,7 @@int (*probe) (struct device * dev);int (*remove) (struct device * dev);void (*shutdown) (struct device * dev); -int (*suspend) (struct device * dev,u32 state,u32 level); +int (*suspend) (struct device * dev,pm_message_t state,u32 level);int (*resume) (struct device * dev,u32 level); };
include/linux/mmc/card.h +1 -1
@@ -75,7 +75,7 @@struct device_driver drv;int (*probe)(struct mmc_card *);void (*remove)(struct mmc_card *); -int (*suspend)(struct mmc_card *,u32 ); +int (*suspend)(struct mmc_card *,pm_message_t );int (*resume)(struct mmc_card *); };
include/linux/usb.h +2 -2
@@ -547,7 +547,7 @@int (*ioctl) (struct usb_interface *intf,unsigned int code,void *buf); -int (*suspend) (struct usb_interface *intf,u32 state); +int (*suspend) (struct usb_interface *intf,pm_message_t state);int (*resume) (struct usb_interface *intf);const struct usb_device_id *id_table;
@@ -966,7 +966,7 @@ int timeout);/* selective suspend/resume */ -extern int usb_suspend_device (struct usb_device *dev,u32 state); +extern int usb_suspend_device (struct usb_device *dev,pm_message_t state);extern int usb_resume_device (struct usb_device *dev);
include/pcmcia/ss.h +1 -1
@@ -250,7 +250,7 @@extern struct class pcmcia_socket_class;/* socket drivers are expected to use these callbacks in their .drv struct */ -extern int pcmcia_socket_dev_suspend (struct device *dev,u32 state); +extern int pcmcia_socket_dev_suspend (struct device *dev,pm_message_t state);extern int pcmcia_socket_dev_resume (struct device *dev);#endif /* _LINUX_SS_H */
Signature · 2 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!