ps3vram.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) ps3vram.c (8b9ab62662048a3274361c7e5f64037c2c133e2c)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * ps3vram - Use extra PS3 video ram as block device.
4 *
5 * Copyright 2009 Sony Corporation
6 *
7 * Based on the MTD ps3vram driver, which is
8 * Copyright (c) 2007-2008 Jim Paris <jim@jtan.com>

--- 747 unchanged lines hidden (view full) ---

756
757 error = device_add_disk(&dev->core, gendisk, NULL);
758 if (error)
759 goto out_cleanup_disk;
760
761 return 0;
762
763out_cleanup_disk:
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * ps3vram - Use extra PS3 video ram as block device.
4 *
5 * Copyright 2009 Sony Corporation
6 *
7 * Based on the MTD ps3vram driver, which is
8 * Copyright (c) 2007-2008 Jim Paris <jim@jtan.com>

--- 747 unchanged lines hidden (view full) ---

756
757 error = device_add_disk(&dev->core, gendisk, NULL);
758 if (error)
759 goto out_cleanup_disk;
760
761 return 0;
762
763out_cleanup_disk:
764 blk_cleanup_disk(gendisk);
764 put_disk(gendisk);
765out_cache_cleanup:
766 remove_proc_entry(DEVICE_NAME, NULL);
767 ps3vram_cache_cleanup(dev);
768out_unmap_reports:
769 iounmap(priv->reports);
770out_unmap_ctrl:
771 iounmap(priv->ctrl);
772out_unmap_context:

--- 14 unchanged lines hidden (view full) ---

787 return error;
788}
789
790static void ps3vram_remove(struct ps3_system_bus_device *dev)
791{
792 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
793
794 del_gendisk(priv->gendisk);
765out_cache_cleanup:
766 remove_proc_entry(DEVICE_NAME, NULL);
767 ps3vram_cache_cleanup(dev);
768out_unmap_reports:
769 iounmap(priv->reports);
770out_unmap_ctrl:
771 iounmap(priv->ctrl);
772out_unmap_context:

--- 14 unchanged lines hidden (view full) ---

787 return error;
788}
789
790static void ps3vram_remove(struct ps3_system_bus_device *dev)
791{
792 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
793
794 del_gendisk(priv->gendisk);
795 blk_cleanup_disk(priv->gendisk);
795 put_disk(priv->gendisk);
796 remove_proc_entry(DEVICE_NAME, NULL);
797 ps3vram_cache_cleanup(dev);
798 iounmap(priv->reports);
799 iounmap(priv->ctrl);
800 lv1_gpu_context_iomap(priv->context_handle, XDR_IOIF,
801 ps3_mm_phys_to_lpar(__pa(priv->xdr_buf)),
802 XDR_BUF_SIZE, CBE_IOPTE_M);
803 lv1_gpu_context_free(priv->context_handle);

--- 55 unchanged lines hidden ---
796 remove_proc_entry(DEVICE_NAME, NULL);
797 ps3vram_cache_cleanup(dev);
798 iounmap(priv->reports);
799 iounmap(priv->ctrl);
800 lv1_gpu_context_iomap(priv->context_handle, XDR_IOIF,
801 ps3_mm_phys_to_lpar(__pa(priv->xdr_buf)),
802 XDR_BUF_SIZE, CBE_IOPTE_M);
803 lv1_gpu_context_free(priv->context_handle);

--- 55 unchanged lines hidden ---