static int lynxfb_suspend(struct pci_dev *pdev, pm_message_t mesg)
{
struct fb_info *info;
+ struct sm750_dev *sm750_dev;
struct lynx_share *share;
int ret;
return 0;
ret = 0;
- share = pci_get_drvdata(pdev);
+ sm750_dev = pci_get_drvdata(pdev);
+ share = &sm750_dev->share;
switch (mesg.event) {
case PM_EVENT_FREEZE:
case PM_EVENT_PRETHAW:
int ret;
ret = 0;
- share = pci_get_drvdata(pdev);
- sm750_dev = container_of(share, struct sm750_dev, share);
+ sm750_dev = pci_get_drvdata(pdev);
+ share = &sm750_dev->share;
console_lock();
pr_info("sm%3x mmio address = %p\n", share->devid, share->pvReg);
- pci_set_drvdata(pdev, share);
+ pci_set_drvdata(pdev, sm750_dev);
/* call chipInit routine */
hw_sm750_inithw(sm750_dev, pdev);
int cnt;
cnt = 2;
- share = pci_get_drvdata(pdev);
+ sm750_dev = pci_get_drvdata(pdev);
+ share = &sm750_dev->share;
while (cnt-- > 0) {
info = share->fbinfo[cnt];
iounmap(share->pvReg);
iounmap(share->pvMem);
- sm750_dev = container_of(share, struct sm750_dev, share);
kfree(g_settings);
kfree(sm750_dev);
pci_set_drvdata(pdev, NULL);