merge filename and modify references to iseries/hv_lp_event.h
[linux-2.6.git] / drivers / cdrom / viocd.c
index fcca26c..da78729 100644 (file)
@@ -47,7 +47,7 @@
 #include <asm/vio.h>
 #include <asm/scatterlist.h>
 #include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/HvLpEvent.h>
+#include <asm/iseries/hv_lp_event.h>
 #include <asm/iSeries/vio.h>
 
 #define VIOCD_DEVICE                   "iseries/vcd"
@@ -488,6 +488,20 @@ static int viocd_packet(struct cdrom_device_info *cdi,
                                         & (CDC_DVD_RAM | CDC_RAM)) != 0;
                }
                break;
+       case GPCMD_GET_CONFIGURATION:
+               if (cgc->cmd[3] == CDF_RWRT) {
+                       struct rwrt_feature_desc *rfd = (struct rwrt_feature_desc *)(cgc->buffer + sizeof(struct feature_header));
+
+                       if ((buflen >=
+                            (sizeof(struct feature_header) + sizeof(*rfd))) &&
+                           (cdi->ops->capability & ~cdi->mask
+                            & (CDC_DVD_RAM | CDC_RAM))) {
+                               rfd->feature_code = cpu_to_be16(CDF_RWRT);
+                               rfd->curr = 1;
+                               ret = 0;
+                       }
+               }
+               break;
        default:
                if (cgc->sense) {
                        /* indicate Unknown code */
@@ -720,15 +734,18 @@ static int viocd_remove(struct vio_dev *vdev)
  */
 static struct vio_device_id viocd_device_table[] __devinitdata = {
        { "viocd", "" },
-       { 0, }
+       { "", "" }
 };
-
 MODULE_DEVICE_TABLE(vio, viocd_device_table);
+
 static struct vio_driver viocd_driver = {
-       .name = "viocd",
        .id_table = viocd_device_table,
        .probe = viocd_probe,
-       .remove = viocd_remove
+       .remove = viocd_remove,
+       .driver = {
+               .name = "viocd",
+               .owner = THIS_MODULE,
+       }
 };
 
 static int __init viocd_init(void)